Skip to content

Commit 9c70df3

Browse files
obourgainmbellade
andauthored
Apply suggestions from code review
Co-authored-by: Marco Belladelli <[email protected]>
1 parent 789d3c9 commit 9c70df3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

hibernate-core/src/main/java/org/hibernate/internal/util/ReflectHelper.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -576,8 +576,8 @@ public static void verifyNoIsVariantExists(
576576
for ( Method declaredMethod : containerClass.getDeclaredMethods() ) {
577577
if ( declaredMethod.getParameterCount() == 0
578578
&& !Modifier.isStatic( declaredMethod.getModifiers() )
579-
&& declaredMethod.getName().startsWith("is")
580-
&& declaredMethod.getName().regionMatches(0, stemName, 0, stemName.length() )
579+
&& declaredMethod.getName().startsWith( "is" )
580+
&& declaredMethod.getName().regionMatches( 2, stemName, 0, stemName.length() )
581581
&& declaredMethod.getAnnotation( Transient.class ) == null ) {
582582
checkGetAndIsVariants( containerClass, propertyName, getMethod, declaredMethod );
583583
}
@@ -615,8 +615,8 @@ public static void verifyNoGetVariantExists(
615615
for ( Method declaredMethod : containerClass.getDeclaredMethods() ) {
616616
if ( declaredMethod.getParameterCount() == 0
617617
&& !Modifier.isStatic( declaredMethod.getModifiers() )
618-
&& declaredMethod.getName().startsWith("is")
619-
&& declaredMethod.getName().regionMatches(0, stemName, 0, stemName.length() )
618+
&& declaredMethod.getName().startsWith( "get" )
619+
&& declaredMethod.getName().regionMatches( 3, stemName, 0, stemName.length() )
620620
&& declaredMethod.getAnnotation( Transient.class ) == null ) {
621621
checkGetAndIsVariants( containerClass, propertyName, declaredMethod, isMethod );
622622
}

0 commit comments

Comments
 (0)