@@ -525,8 +525,7 @@ private static Method getGetterOrNull(Class containerClass, String propertyName)
525525 // try "get"
526526 if ( methodName .startsWith ( "get" ) ) {
527527 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 ) ) {
530529 verifyNoIsVariantExists ( containerClass , propertyName , method , stemName , declaredMethods );
531530 return method ;
532531 }
@@ -536,8 +535,7 @@ private static Method getGetterOrNull(Class containerClass, String propertyName)
536535 // if not "get", then try "is"
537536 if ( methodName .startsWith ( "is" ) ) {
538537 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 ) ) {
541539 verifyNoGetVariantExists ( containerClass , propertyName , method , stemName , declaredMethods );
542540 return method ;
543541 }
@@ -690,8 +688,7 @@ private static Method setterOrNull(Class theClass, String propertyName, Class pr
690688 final String methodName = method .getName ();
691689 if ( method .getParameterCount () == 1 && methodName .startsWith ( "set" ) ) {
692690 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 )) {
695692 potentialSetter = method ;
696693 if ( propertyType == null || method .getParameterTypes ()[0 ].equals ( propertyType ) ) {
697694 break ;
@@ -730,8 +727,7 @@ public static Method findGetterMethodForFieldAccess(Field field, String property
730727 // try "get"
731728 if ( methodName .startsWith ( "get" ) ) {
732729 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 ) ) {
735731 return method ;
736732 }
737733
@@ -740,8 +736,7 @@ public static Method findGetterMethodForFieldAccess(Field field, String property
740736 // if not "get", then try "is"
741737 if ( methodName .startsWith ( "is" ) ) {
742738 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 ) ) {
745740 return method ;
746741 }
747742 }
0 commit comments