Skip to content

Commit 9f39c0a

Browse files
committed
HHH-19896 Criteria select case expressions: NPE when second query contains an otherwise case expression but not the first query
1 parent cfa40e7 commit 9f39c0a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hibernate-core/src/main/java/org/hibernate/query/sqm/tree/SqmCacheable.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public interface SqmCacheable {
2020
int cacheHashCode();
2121

2222
static boolean areCompatible(@Nullable SqmCacheable e1, @Nullable SqmCacheable e2) {
23-
return e1 == null ? e2 == null : e1.isCompatible( e2 );
23+
return e1 == null ? e2 == null : e2 != null && e1.isCompatible( e2 );
2424
}
2525

2626
static boolean areCompatible(@Nullable Collection<? extends SqmCacheable> collection1, @Nullable Collection<? extends SqmCacheable> collection2) {

0 commit comments

Comments
 (0)