@@ -129,31 +129,31 @@ public String toString() {
129
129
}
130
130
131
131
private void initWebMethodViaAnnotation () {
132
- final var form = findAnnotation (Form .class );
132
+ Form form = findAnnotation (Form .class );
133
133
if (form != null ) {
134
134
this .formMarker = true ;
135
135
}
136
- final var get = findAnnotation (Get .class );
136
+ Get get = findAnnotation (Get .class );
137
137
if (get != null ) {
138
138
initSetWebMethod (WebMethod .GET , get .value ());
139
139
return ;
140
140
}
141
- final var put = findAnnotation (Put .class );
141
+ Put put = findAnnotation (Put .class );
142
142
if (put != null ) {
143
143
initSetWebMethod (WebMethod .PUT , put .value ());
144
144
return ;
145
145
}
146
- final var post = findAnnotation (Post .class );
146
+ Post post = findAnnotation (Post .class );
147
147
if (post != null ) {
148
148
initSetWebMethod (WebMethod .POST , post .value ());
149
149
return ;
150
150
}
151
- final var patch = findAnnotation (Patch .class );
151
+ Patch patch = findAnnotation (Patch .class );
152
152
if (patch != null ) {
153
153
initSetWebMethod (WebMethod .PATCH , patch .value ());
154
154
return ;
155
155
}
156
- final var delete = findAnnotation (Delete .class );
156
+ Delete delete = findAnnotation (Delete .class );
157
157
if (delete != null ) {
158
158
initSetWebMethod (WebMethod .DELETE , delete .value ());
159
159
}
@@ -217,7 +217,7 @@ private List<String> addTagsToList(Element element, List<String> list) {
217
217
list .add (element .getAnnotation (Tag .class ).name ());
218
218
}
219
219
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 ())
221
221
list .add (tag .name ());
222
222
}
223
223
return list ;
@@ -238,20 +238,20 @@ void read() {
238
238
239
239
// non-path parameters default to form or query parameters based on the
240
240
// existence of @Form annotation on the method
241
- final var defaultParamType = (formMarker ) ? ParamType .FORMPARAM : ParamType .QUERYPARAM ;
241
+ ParamType defaultParamType = (formMarker ) ? ParamType .FORMPARAM : ParamType .QUERYPARAM ;
242
242
243
243
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 );
246
246
TypeMirror typeMirror ;
247
247
if (actualParams != null ) {
248
248
typeMirror = actualParams .get (i );
249
249
} else {
250
250
typeMirror = p .asType ();
251
251
}
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 );
255
255
params .add (param );
256
256
param .addImports (bean );
257
257
}
@@ -333,7 +333,7 @@ public String simpleName() {
333
333
}
334
334
335
335
public boolean isFormBody () {
336
- for (final MethodParam param : params ) {
336
+ for (MethodParam param : params ) {
337
337
if (param .isForm ()) {
338
338
return true ;
339
339
}
@@ -342,7 +342,7 @@ public boolean isFormBody() {
342
342
}
343
343
344
344
public String bodyType () {
345
- for (final MethodParam param : params ) {
345
+ for (MethodParam param : params ) {
346
346
if (param .isBody ()) {
347
347
return param .shortType ();
348
348
}
@@ -351,7 +351,7 @@ public String bodyType() {
351
351
}
352
352
353
353
public String bodyName () {
354
- for (final MethodParam param : params ) {
354
+ for (MethodParam param : params ) {
355
355
if (param .isBody ()) {
356
356
return param .name ();
357
357
}
0 commit comments