@@ -208,20 +208,20 @@ private static boolean inGroupByOrOrderBy(SqmPath<?> sqmPath, SqmToSqlAstConvert
208
208
final NavigablePath np = sqmPath .getNavigablePath ();
209
209
final Boolean found = queryPartStack .findCurrentFirst ( queryPart -> {
210
210
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 ;
214
214
} );
215
215
return Boolean .TRUE .equals ( found );
216
216
}
217
217
218
218
private static CollectionPart getCollectionPart (PluralAttributeMapping attribute , NavigablePath path ) {
219
219
final CollectionPart .Nature nature = CollectionPart .Nature .fromNameExact ( path .getLocalName () );
220
- return nature != null ? switch ( nature ) {
220
+ return nature == null ? null : switch ( nature ) {
221
221
case ELEMENT -> attribute .getElementDescriptor ();
222
222
case INDEX -> attribute .getIndexDescriptor ();
223
223
case ID -> attribute .getIdentifierDescriptor ();
224
- } : null ;
224
+ };
225
225
}
226
226
227
227
/**
@@ -299,12 +299,10 @@ private static boolean isFiltered(EntityAssociationMapping associationMapping) {
299
299
}
300
300
301
301
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 ;
308
306
}
309
307
310
308
private static @ Nullable EntityAssociationMapping resolveAssociationMapping (SqmSingularJoin <?, ?> sqmJoin ) {
0 commit comments