@@ -513,8 +513,7 @@ private static Method getGetterOrNull(Class containerClass, String propertyName)
513
513
// try "get"
514
514
if ( methodName .startsWith ( "get" ) ) {
515
515
final String stemName = methodName .substring ( 3 );
516
- final String decapitalizedStemName = Introspector .decapitalize ( stemName );
517
- if ( stemName .equals ( propertyName ) || decapitalizedStemName .equals ( propertyName ) ) {
516
+ if ( stemName .equals ( propertyName ) || Introspector .decapitalize ( stemName ).equals ( propertyName ) ) {
518
517
verifyNoIsVariantExists ( containerClass , propertyName , method , stemName , declaredMethods );
519
518
return method ;
520
519
}
@@ -524,8 +523,7 @@ private static Method getGetterOrNull(Class containerClass, String propertyName)
524
523
// if not "get", then try "is"
525
524
if ( methodName .startsWith ( "is" ) ) {
526
525
final String stemName = methodName .substring ( 2 );
527
- String decapitalizedStemName = Introspector .decapitalize ( stemName );
528
- if ( stemName .equals ( propertyName ) || decapitalizedStemName .equals ( propertyName ) ) {
526
+ if ( stemName .equals ( propertyName ) || Introspector .decapitalize ( stemName ).equals ( propertyName ) ) {
529
527
verifyNoGetVariantExists ( containerClass , propertyName , method , stemName , declaredMethods );
530
528
return method ;
531
529
}
@@ -678,8 +676,7 @@ private static Method setterOrNull(Class theClass, String propertyName, Class pr
678
676
final String methodName = method .getName ();
679
677
if ( method .getParameterCount () == 1 && methodName .startsWith ( "set" ) ) {
680
678
final String testOldMethod = methodName .substring ( 3 );
681
- final String testStdMethod = Introspector .decapitalize ( testOldMethod );
682
- if ( testStdMethod .equals ( propertyName ) || testOldMethod .equals ( propertyName ) ) {
679
+ if (testOldMethod .equals ( propertyName ) || Introspector .decapitalize ( testOldMethod ).equals ( propertyName )) {
683
680
potentialSetter = method ;
684
681
if ( propertyType == null || method .getParameterTypes ()[0 ].equals ( propertyType ) ) {
685
682
break ;
@@ -718,8 +715,7 @@ public static Method findGetterMethodForFieldAccess(Field field, String property
718
715
// try "get"
719
716
if ( methodName .startsWith ( "get" ) ) {
720
717
final String stemName = methodName .substring ( 3 );
721
- final String decapitalizedStemName = Introspector .decapitalize ( stemName );
722
- if ( stemName .equals ( propertyName ) || decapitalizedStemName .equals ( propertyName ) ) {
718
+ if ( stemName .equals ( propertyName ) || Introspector .decapitalize ( stemName ).equals ( propertyName ) ) {
723
719
return method ;
724
720
}
725
721
@@ -728,8 +724,7 @@ public static Method findGetterMethodForFieldAccess(Field field, String property
728
724
// if not "get", then try "is"
729
725
if ( methodName .startsWith ( "is" ) ) {
730
726
final String stemName = methodName .substring ( 2 );
731
- String decapitalizedStemName = Introspector .decapitalize ( stemName );
732
- if ( stemName .equals ( propertyName ) || decapitalizedStemName .equals ( propertyName ) ) {
727
+ if ( stemName .equals ( propertyName ) || Introspector .decapitalize ( stemName ).equals ( propertyName ) ) {
733
728
return method ;
734
729
}
735
730
}
0 commit comments