@@ -144,32 +144,32 @@ private Integer computeHashCode() {
144
144
private int getValueHashCode (Object value ) {
145
145
// Use Arrays.hashCode(...) since Spring's ObjectUtils doesn't comply
146
146
// with the requirements specified in Annotation#hashCode().
147
- if (value instanceof boolean []) {
148
- return Arrays .hashCode (( boolean []) value );
147
+ if (value instanceof boolean [] booleans ) {
148
+ return Arrays .hashCode (booleans );
149
149
}
150
- if (value instanceof byte []) {
151
- return Arrays .hashCode (( byte []) value );
150
+ if (value instanceof byte [] bytes ) {
151
+ return Arrays .hashCode (bytes );
152
152
}
153
- if (value instanceof char []) {
154
- return Arrays .hashCode (( char []) value );
153
+ if (value instanceof char [] chars ) {
154
+ return Arrays .hashCode (chars );
155
155
}
156
- if (value instanceof double []) {
157
- return Arrays .hashCode (( double []) value );
156
+ if (value instanceof double [] doubles ) {
157
+ return Arrays .hashCode (doubles );
158
158
}
159
- if (value instanceof float []) {
160
- return Arrays .hashCode (( float []) value );
159
+ if (value instanceof float [] floats ) {
160
+ return Arrays .hashCode (floats );
161
161
}
162
- if (value instanceof int []) {
163
- return Arrays .hashCode (( int []) value );
162
+ if (value instanceof int [] ints ) {
163
+ return Arrays .hashCode (ints );
164
164
}
165
- if (value instanceof long []) {
166
- return Arrays .hashCode (( long []) value );
165
+ if (value instanceof long [] longs ) {
166
+ return Arrays .hashCode (longs );
167
167
}
168
- if (value instanceof short []) {
169
- return Arrays .hashCode (( short []) value );
168
+ if (value instanceof short [] shorts ) {
169
+ return Arrays .hashCode (shorts );
170
170
}
171
- if (value instanceof Object []) {
172
- return Arrays .hashCode (( Object []) value );
171
+ if (value instanceof Object [] objects ) {
172
+ return Arrays .hashCode (objects );
173
173
}
174
174
return value .hashCode ();
175
175
}
@@ -195,14 +195,14 @@ private String annotationToString() {
195
195
}
196
196
197
197
private String toString (Object value ) {
198
- if (value instanceof String ) {
199
- return '"' + value . toString () + '"' ;
198
+ if (value instanceof String str ) {
199
+ return '"' + str + '"' ;
200
200
}
201
- if (value instanceof Enum ) {
202
- return (( Enum <?>) value ) .name ();
201
+ if (value instanceof Enum <?> e ) {
202
+ return e .name ();
203
203
}
204
- if (value instanceof Class ) {
205
- return (( Class <?>) value ) .getName () + ".class" ;
204
+ if (value instanceof Class <?> clazz ) {
205
+ return clazz .getName () + ".class" ;
206
206
}
207
207
if (value .getClass ().isArray ()) {
208
208
StringBuilder builder = new StringBuilder ("{" );
@@ -239,29 +239,29 @@ private Object getAttributeValue(Method method) {
239
239
* @param array the array to clone
240
240
*/
241
241
private Object cloneArray (Object array ) {
242
- if (array instanceof boolean []) {
243
- return (( boolean []) array ) .clone ();
242
+ if (array instanceof boolean [] booleans ) {
243
+ return booleans .clone ();
244
244
}
245
- if (array instanceof byte []) {
246
- return (( byte []) array ) .clone ();
245
+ if (array instanceof byte [] bytes ) {
246
+ return bytes .clone ();
247
247
}
248
- if (array instanceof char []) {
249
- return (( char []) array ) .clone ();
248
+ if (array instanceof char [] chars ) {
249
+ return chars .clone ();
250
250
}
251
- if (array instanceof double []) {
252
- return (( double []) array ) .clone ();
251
+ if (array instanceof double [] doubles ) {
252
+ return doubles .clone ();
253
253
}
254
- if (array instanceof float []) {
255
- return (( float []) array ) .clone ();
254
+ if (array instanceof float [] floats ) {
255
+ return floats .clone ();
256
256
}
257
- if (array instanceof int []) {
258
- return (( int []) array ) .clone ();
257
+ if (array instanceof int [] ints ) {
258
+ return ints .clone ();
259
259
}
260
- if (array instanceof long []) {
261
- return (( long []) array ) .clone ();
260
+ if (array instanceof long [] longs ) {
261
+ return longs .clone ();
262
262
}
263
- if (array instanceof short []) {
264
- return (( short []) array ) .clone ();
263
+ if (array instanceof short [] shorts ) {
264
+ return shorts .clone ();
265
265
}
266
266
267
267
// else
0 commit comments