Skip to content

Commit 1f912ed

Browse files
committed
remove formatting
1 parent cea0910 commit 1f912ed

File tree

2 files changed

+16
-42
lines changed

2 files changed

+16
-42
lines changed

http-generator-core/src/main/java/io/avaje/http/generator/core/MethodReader.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -129,31 +129,31 @@ public String toString() {
129129
}
130130

131131
private void initWebMethodViaAnnotation() {
132-
final var form = findAnnotation(Form.class);
132+
Form form = findAnnotation(Form.class);
133133
if (form != null) {
134134
this.formMarker = true;
135135
}
136-
final var get = findAnnotation(Get.class);
136+
Get get = findAnnotation(Get.class);
137137
if (get != null) {
138138
initSetWebMethod(WebMethod.GET, get.value());
139139
return;
140140
}
141-
final var put = findAnnotation(Put.class);
141+
Put put = findAnnotation(Put.class);
142142
if (put != null) {
143143
initSetWebMethod(WebMethod.PUT, put.value());
144144
return;
145145
}
146-
final var post = findAnnotation(Post.class);
146+
Post post = findAnnotation(Post.class);
147147
if (post != null) {
148148
initSetWebMethod(WebMethod.POST, post.value());
149149
return;
150150
}
151-
final var patch = findAnnotation(Patch.class);
151+
Patch patch = findAnnotation(Patch.class);
152152
if (patch != null) {
153153
initSetWebMethod(WebMethod.PATCH, patch.value());
154154
return;
155155
}
156-
final var delete = findAnnotation(Delete.class);
156+
Delete delete = findAnnotation(Delete.class);
157157
if (delete != null) {
158158
initSetWebMethod(WebMethod.DELETE, delete.value());
159159
}
@@ -217,7 +217,7 @@ private List<String> addTagsToList(Element element, List<String> list) {
217217
list.add(element.getAnnotation(Tag.class).name());
218218
}
219219
if (element.getAnnotation(Tags.class) != null) {
220-
for (final Tag tag : element.getAnnotation(Tags.class).value())
220+
for (Tag tag : element.getAnnotation(Tags.class).value())
221221
list.add(tag.name());
222222
}
223223
return list;
@@ -238,20 +238,20 @@ void read() {
238238

239239
// non-path parameters default to form or query parameters based on the
240240
// existence of @Form annotation on the method
241-
final var defaultParamType = (formMarker) ? ParamType.FORMPARAM : ParamType.QUERYPARAM;
241+
ParamType defaultParamType = (formMarker) ? ParamType.FORMPARAM : ParamType.QUERYPARAM;
242242

243243
final List<? extends VariableElement> parameters = element.getParameters();
244-
for (var i = 0; i < parameters.size(); i++) {
245-
final VariableElement p = parameters.get(i);
244+
for (int i = 0; i < parameters.size(); i++) {
245+
VariableElement p = parameters.get(i);
246246
TypeMirror typeMirror;
247247
if (actualParams != null) {
248248
typeMirror = actualParams.get(i);
249249
} else {
250250
typeMirror = p.asType();
251251
}
252-
final var rawType = Util.typeDef(typeMirror);
253-
final var type = Util.parse(typeMirror.toString());
254-
final var param = new MethodParam(p, type, rawType, ctx, defaultParamType, formMarker);
252+
String rawType = Util.typeDef(typeMirror);
253+
UType type = Util.parse(typeMirror.toString());
254+
MethodParam param = new MethodParam(p, type, rawType, ctx, defaultParamType, formMarker);
255255
params.add(param);
256256
param.addImports(bean);
257257
}
@@ -333,7 +333,7 @@ public String simpleName() {
333333
}
334334

335335
public boolean isFormBody() {
336-
for (final MethodParam param : params) {
336+
for (MethodParam param : params) {
337337
if (param.isForm()) {
338338
return true;
339339
}
@@ -342,7 +342,7 @@ public boolean isFormBody() {
342342
}
343343

344344
public String bodyType() {
345-
for (final MethodParam param : params) {
345+
for (MethodParam param : params) {
346346
if (param.isBody()) {
347347
return param.shortType();
348348
}
@@ -351,7 +351,7 @@ public String bodyType() {
351351
}
352352

353353
public String bodyName() {
354-
for (final MethodParam param : params) {
354+
for (MethodParam param : params) {
355355
if (param.isBody()) {
356356
return param.name();
357357
}

http-generator-core/src/main/java/io/avaje/http/generator/core/SuperMethodFinder.java

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)