@@ -208,20 +208,20 @@ private static boolean inGroupByOrOrderBy(SqmPath<?> sqmPath, SqmToSqlAstConvert
208208 final NavigablePath np = sqmPath .getNavigablePath ();
209209 final Boolean found = queryPartStack .findCurrentFirst ( queryPart -> {
210210 final SqmQuerySpec <?> spec = queryPart .getFirstQuerySpec ();
211- return spec .groupByClauseContains ( np , converter ) || spec . orderByClauseContains ( np , converter ) ?
212- true :
213- null ;
211+ return spec .groupByClauseContains ( np , converter )
212+ || spec . orderByClauseContains ( np , converter )
213+ ? true : null ;
214214 } );
215215 return Boolean .TRUE .equals ( found );
216216 }
217217
218218 private static CollectionPart getCollectionPart (PluralAttributeMapping attribute , NavigablePath path ) {
219219 final CollectionPart .Nature nature = CollectionPart .Nature .fromNameExact ( path .getLocalName () );
220- return nature != null ? switch ( nature ) {
220+ return nature == null ? null : switch ( nature ) {
221221 case ELEMENT -> attribute .getElementDescriptor ();
222222 case INDEX -> attribute .getIndexDescriptor ();
223223 case ID -> attribute .getIdentifierDescriptor ();
224- } : null ;
224+ };
225225 }
226226
227227 /**
@@ -299,12 +299,10 @@ private static boolean isFiltered(EntityAssociationMapping associationMapping) {
299299 }
300300
301301 private static @ Nullable EntityAssociationMapping resolveAssociationMapping (SqmJoin <?, ?> sqmJoin ) {
302- if ( sqmJoin instanceof SqmSingularJoin <?, ?> singularJoin ) {
303- if ( singularJoin .getAttribute ().getSqmPathType () instanceof EntityDomainType <?> ) {
304- return resolveAssociationMapping ( singularJoin );
305- }
306- }
307- return null ;
302+ return sqmJoin instanceof SqmSingularJoin <?, ?> singularJoin
303+ && singularJoin .getAttribute ().getSqmPathType () instanceof EntityDomainType <?>
304+ ? resolveAssociationMapping ( singularJoin )
305+ : null ;
308306 }
309307
310308 private static @ Nullable EntityAssociationMapping resolveAssociationMapping (SqmSingularJoin <?, ?> sqmJoin ) {
0 commit comments