@@ -577,7 +577,8 @@ public static void verifyNoIsVariantExists(
577
577
for ( Method declaredMethod : containerClass .getDeclaredMethods () ) {
578
578
if ( declaredMethod .getParameterCount () == 0
579
579
&& !Modifier .isStatic ( declaredMethod .getModifiers () )
580
- && Objects .equals ( declaredMethod .getName (), "is" + stemName )
580
+ && declaredMethod .getName ().startsWith ("is" )
581
+ && declaredMethod .getName ().regionMatches (0 , stemName , 0 , stemName .length () )
581
582
&& declaredMethod .getAnnotation ( Transient .class ) == null ) {
582
583
checkGetAndIsVariants ( containerClass , propertyName , getMethod , declaredMethod );
583
584
}
@@ -615,7 +616,8 @@ public static void verifyNoGetVariantExists(
615
616
for ( Method declaredMethod : containerClass .getDeclaredMethods () ) {
616
617
if ( declaredMethod .getParameterCount () == 0
617
618
&& !Modifier .isStatic ( declaredMethod .getModifiers () )
618
- && Objects .equals ( declaredMethod .getName (), "get" + stemName )
619
+ && declaredMethod .getName ().startsWith ("is" )
620
+ && declaredMethod .getName ().regionMatches (0 , stemName , 0 , stemName .length () )
619
621
&& declaredMethod .getAnnotation ( Transient .class ) == null ) {
620
622
checkGetAndIsVariants ( containerClass , propertyName , declaredMethod , isMethod );
621
623
}
0 commit comments