@@ -111,9 +111,9 @@ public J.Annotation visitAnnotation(J.Annotation original, ExecutionContext ctx)
111
111
return JavaTemplate
112
112
.apply ("#{}" , getCursor (), a .getCoordinates ().replaceArguments (), newAttributeValue );
113
113
}
114
- String x = newAttributeValue .contains ("," ) && attributeIsArray (a ) ? getAttributeValuesAsString () : newAttributeValue ;
114
+ String attrVal = newAttributeValue .contains ("," ) && attributeIsArray (a ) ? getAttributeValuesAsString () : newAttributeValue ;
115
115
return JavaTemplate
116
- .apply ("#{} = #{}" , getCursor (), a .getCoordinates ().replaceArguments (), attributeName , x );
116
+ .apply ("#{} = #{}" , getCursor (), a .getCoordinates ().replaceArguments (), attributeName , attrVal );
117
117
}
118
118
119
119
// UPDATE the value when the annotation has arguments, e.g. @Foo(name="old") to `@Foo(name="new")
@@ -199,10 +199,10 @@ public J.Annotation visitAnnotation(J.Annotation original, ExecutionContext ctx)
199
199
if (!valueMatches (fieldAccess , oldAttributeValue ) || newAttributeValue .equals (fieldAccess .toString ())) {
200
200
return fieldAccess ;
201
201
}
202
- String x = newAttributeValue .contains ("," ) && attributeIsArray (annotation ) ? getAttributeValues ().stream ().map (String ::valueOf ).collect (joining ("," , "{" , "}" )) : newAttributeValue ;
202
+ String attrVal = newAttributeValue .contains ("," ) && attributeIsArray (annotation ) ? getAttributeValues ().stream ().map (String ::valueOf ).collect (joining ("," , "{" , "}" )) : newAttributeValue ;
203
203
//noinspection ConstantConditions
204
204
return ((J .Annotation ) JavaTemplate
205
- .apply ("#{}" , getCursor (), annotation .getCoordinates ().replaceArguments (), x ))
205
+ .apply ("#{}" , getCursor (), annotation .getCoordinates ().replaceArguments (), attrVal ))
206
206
.getArguments ().get (0 );
207
207
}
208
208
// Make the attribute name explicit, before we add the new value below
@@ -220,10 +220,10 @@ public J.Annotation visitAnnotation(J.Annotation original, ExecutionContext ctx)
220
220
}
221
221
222
222
private Expression createAnnotationLiteral (J .Annotation annotation , String newAttributeValue ) {
223
- String x = newAttributeValue .contains ("," ) && attributeIsArray (annotation ) ? getAttributeValuesAsString () : newAttributeValue ;
223
+ String attrVal = newAttributeValue .contains ("," ) && attributeIsArray (annotation ) ? getAttributeValuesAsString () : newAttributeValue ;
224
224
//noinspection ConstantConditions
225
225
return ((J .Annotation ) JavaTemplate
226
- .apply ("#{}" , getCursor (), annotation .getCoordinates ().replaceArguments (), x ))
226
+ .apply ("#{}" , getCursor (), annotation .getCoordinates ().replaceArguments (), attrVal ))
227
227
.getArguments ().get (0 );
228
228
}
229
229
0 commit comments