@@ -525,8 +525,7 @@ private static Method getGetterOrNull(Class containerClass, String propertyName)
525
525
// try "get"
526
526
if ( methodName .startsWith ( "get" ) ) {
527
527
final String stemName = methodName .substring ( 3 );
528
- final String decapitalizedStemName = Introspector .decapitalize ( stemName );
529
- if ( stemName .equals ( propertyName ) || decapitalizedStemName .equals ( propertyName ) ) {
528
+ if ( stemName .equals ( propertyName ) || Introspector .decapitalize ( stemName ).equals ( propertyName ) ) {
530
529
verifyNoIsVariantExists ( containerClass , propertyName , method , stemName , declaredMethods );
531
530
return method ;
532
531
}
@@ -536,8 +535,7 @@ private static Method getGetterOrNull(Class containerClass, String propertyName)
536
535
// if not "get", then try "is"
537
536
if ( methodName .startsWith ( "is" ) ) {
538
537
final String stemName = methodName .substring ( 2 );
539
- String decapitalizedStemName = Introspector .decapitalize ( stemName );
540
- if ( stemName .equals ( propertyName ) || decapitalizedStemName .equals ( propertyName ) ) {
538
+ if ( stemName .equals ( propertyName ) || Introspector .decapitalize ( stemName ).equals ( propertyName ) ) {
541
539
verifyNoGetVariantExists ( containerClass , propertyName , method , stemName , declaredMethods );
542
540
return method ;
543
541
}
@@ -690,8 +688,7 @@ private static Method setterOrNull(Class theClass, String propertyName, Class pr
690
688
final String methodName = method .getName ();
691
689
if ( method .getParameterCount () == 1 && methodName .startsWith ( "set" ) ) {
692
690
final String testOldMethod = methodName .substring ( 3 );
693
- final String testStdMethod = Introspector .decapitalize ( testOldMethod );
694
- if ( testStdMethod .equals ( propertyName ) || testOldMethod .equals ( propertyName ) ) {
691
+ if (testOldMethod .equals ( propertyName ) || Introspector .decapitalize ( testOldMethod ).equals ( propertyName )) {
695
692
potentialSetter = method ;
696
693
if ( propertyType == null || method .getParameterTypes ()[0 ].equals ( propertyType ) ) {
697
694
break ;
@@ -730,8 +727,7 @@ public static Method findGetterMethodForFieldAccess(Field field, String property
730
727
// try "get"
731
728
if ( methodName .startsWith ( "get" ) ) {
732
729
final String stemName = methodName .substring ( 3 );
733
- final String decapitalizedStemName = Introspector .decapitalize ( stemName );
734
- if ( stemName .equals ( propertyName ) || decapitalizedStemName .equals ( propertyName ) ) {
730
+ if ( stemName .equals ( propertyName ) || Introspector .decapitalize ( stemName ).equals ( propertyName ) ) {
735
731
return method ;
736
732
}
737
733
@@ -740,8 +736,7 @@ public static Method findGetterMethodForFieldAccess(Field field, String property
740
736
// if not "get", then try "is"
741
737
if ( methodName .startsWith ( "is" ) ) {
742
738
final String stemName = methodName .substring ( 2 );
743
- String decapitalizedStemName = Introspector .decapitalize ( stemName );
744
- if ( stemName .equals ( propertyName ) || decapitalizedStemName .equals ( propertyName ) ) {
739
+ if ( stemName .equals ( propertyName ) || Introspector .decapitalize ( stemName ).equals ( propertyName ) ) {
745
740
return method ;
746
741
}
747
742
}
0 commit comments