diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/AbstractSqmFrom.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/AbstractSqmFrom.java index ad72b325e1..159667fe87 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/AbstractSqmFrom.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/AbstractSqmFrom.java @@ -320,7 +320,7 @@ public abstract class AbstractSqmFrom extends AbstractSqmPath implements public Set> getJoins() { //noinspection unchecked return (Set>) (Set) getSqmJoins().stream() - .filter( sqmJoin -> ! ( sqmJoin instanceof SqmAttributeJoin && ( (SqmAttributeJoin) sqmJoin ).isFetched() ) ) + .filter( sqmJoin -> sqmJoin instanceof SqmAttributeJoin && !( (SqmAttributeJoin) sqmJoin ).isFetched() ) .collect( Collectors.toSet() ); } diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/FromClauseTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/FromClauseTests.java index f1a9d41dc0..7d7bce5491 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/FromClauseTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/FromClauseTests.java @@ -109,7 +109,7 @@ public class FromClauseTests extends BaseSqmUnitTest { final SqmRoot sqmRoot = fromClause.getRoots().get( 0 ); assertThat( sqmRoot, notNullValue() ); assertThat( sqmRoot.getExplicitAlias(), is( "p" ) ); - assertThat( sqmRoot.getJoins(), hasSize( 1 ) ); + assertThat( sqmRoot.getSqmJoins(), hasSize( 1 ) ); assertThat( sqmRoot.getSqmJoins().get( 0 ).getExplicitAlias(), is( "p2" ) ); }