Skip to content

Commit d9af3e3

Browse files
committed
HHH-19926 NullPointerException when executing JPQL IN clause with null parameter on entity association
1 parent 4b9c8dd commit d9af3e3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

hibernate-core/src/main/java/org/hibernate/query/spi/AbstractCommonQueryContract.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -815,11 +815,11 @@ public CommonQueryContract setParameter(String name, Object value) {
815815
private boolean multipleBinding(QueryParameter<Object> parameter, Object value){
816816
if ( parameter.allowsMultiValuedBinding() ) {
817817
final var hibernateType = parameter.getHibernateType();
818-
if ( hibernateType == null || isInstance( hibernateType, value ) ) {
819-
return true;
820-
}
818+
return hibernateType == null || value == null || isInstance( hibernateType, value );
819+
}
820+
else {
821+
return false;
821822
}
822-
return false;
823823
}
824824

825825
private <T> void setTypedParameter(String name, TypedParameterValue<T> typedValue) {

0 commit comments

Comments
 (0)