@@ -57,7 +57,7 @@ public abstract class BeanUtils {
57
57
58
58
private static final Log logger = LogFactory .getLog (BeanUtils .class );
59
59
60
- // using WeakHashMap as a Set
60
+ // Effectively using a WeakHashMap as a Set
61
61
private static final Map <Class <?>, Boolean > unknownEditorTypes =
62
62
Collections .synchronizedMap (new WeakHashMap <Class <?>, Boolean >());
63
63
@@ -127,7 +127,7 @@ public static <T> T instantiateClass(Class<T> clazz) throws BeanInstantiationExc
127
127
@ SuppressWarnings ("unchecked" )
128
128
public static <T > T instantiateClass (Class <?> clazz , Class <T > assignableTo ) throws BeanInstantiationException {
129
129
Assert .isAssignable (assignableTo , clazz );
130
- return (T )instantiateClass (clazz );
130
+ return (T ) instantiateClass (clazz );
131
131
}
132
132
133
133
/**
@@ -281,7 +281,7 @@ public static Method findMethodWithMinimalParameters(Method[] methods, String me
281
281
}
282
282
else {
283
283
if (targetMethod .getParameterTypes ().length == numParams ) {
284
- // Additional candidate with same length.
284
+ // Additional candidate with same length
285
285
numMethodsFoundWithCurrentMinimumArgs ++;
286
286
}
287
287
}
@@ -317,10 +317,8 @@ public static Method findMethodWithMinimalParameters(Method[] methods, String me
317
317
public static Method resolveSignature (String signature , Class <?> clazz ) {
318
318
Assert .hasText (signature , "'signature' must not be empty" );
319
319
Assert .notNull (clazz , "Class must not be null" );
320
-
321
320
int firstParen = signature .indexOf ("(" );
322
321
int lastParen = signature .indexOf (")" );
323
-
324
322
if (firstParen > -1 && lastParen == -1 ) {
325
323
throw new IllegalArgumentException ("Invalid method signature '" + signature +
326
324
"': expected closing ')' for args list" );
@@ -336,7 +334,7 @@ else if (firstParen == -1 && lastParen == -1) {
336
334
String methodName = signature .substring (0 , firstParen );
337
335
String [] parameterTypeNames =
338
336
StringUtils .commaDelimitedListToStringArray (signature .substring (firstParen + 1 , lastParen ));
339
- Class <?>[] parameterTypes = new Class [parameterTypeNames .length ];
337
+ Class <?>[] parameterTypes = new Class <?> [parameterTypeNames .length ];
340
338
for (int i = 0 ; i < parameterTypeNames .length ; i ++) {
341
339
String parameterTypeName = parameterTypeNames [i ].trim ();
342
340
try {
@@ -475,8 +473,7 @@ public static Class<?> findPropertyType(String propertyName, Class<?>... beanCla
475
473
*/
476
474
public static MethodParameter getWriteMethodParameter (PropertyDescriptor pd ) {
477
475
if (pd instanceof GenericTypeAwarePropertyDescriptor ) {
478
- return new MethodParameter (
479
- ((GenericTypeAwarePropertyDescriptor ) pd ).getWriteMethodParameter ());
476
+ return new MethodParameter (((GenericTypeAwarePropertyDescriptor ) pd ).getWriteMethodParameter ());
480
477
}
481
478
else {
482
479
return new MethodParameter (pd .getWriteMethod (), 0 );
@@ -545,9 +542,7 @@ public static void copyProperties(Object source, Object target) throws BeansExce
545
542
* @throws BeansException if the copying failed
546
543
* @see BeanWrapper
547
544
*/
548
- public static void copyProperties (Object source , Object target , Class <?> editable )
549
- throws BeansException {
550
-
545
+ public static void copyProperties (Object source , Object target , Class <?> editable ) throws BeansException {
551
546
copyProperties (source , target , editable , (String []) null );
552
547
}
553
548
@@ -565,9 +560,7 @@ public static void copyProperties(Object source, Object target, Class<?> editabl
565
560
* @throws BeansException if the copying failed
566
561
* @see BeanWrapper
567
562
*/
568
- public static void copyProperties (Object source , Object target , String ... ignoreProperties )
569
- throws BeansException {
570
-
563
+ public static void copyProperties (Object source , Object target , String ... ignoreProperties ) throws BeansException {
571
564
copyProperties (source , target , null , ignoreProperties );
572
565
}
573
566
0 commit comments