diff --git a/hibernate-core/src/main/java/org/hibernate/internal/util/StringHelper.java b/hibernate-core/src/main/java/org/hibernate/internal/util/StringHelper.java index 3efe332994..31e9d81841 100644 --- a/hibernate-core/src/main/java/org/hibernate/internal/util/StringHelper.java +++ b/hibernate-core/src/main/java/org/hibernate/internal/util/StringHelper.java @@ -624,7 +624,7 @@ public final class StringHelper { } public static String moveAndToBeginning(String filter) { - if ( filter.trim().length() > 0 ) { + if ( !isBlank( filter ) ) { filter += " and "; if ( filter.startsWith( " and " ) ) { filter = filter.substring( 4 );