From 5169f77fb28960242e97c14b610f89cbf93943ed Mon Sep 17 00:00:00 2001 From: Steve Ebersole Date: Mon, 9 Nov 2015 22:04:10 -0600 Subject: [PATCH] HHH-9710 - IllegalArgumentException passing null as parameter value with explicit TemporalType (cherry picked from commit 7a2fbbd79ade49f31462fe1d542c1d59ff84b1cf) --- .../src/main/java/org/hibernate/jpa/internal/QueryImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hibernate-entitymanager/src/main/java/org/hibernate/jpa/internal/QueryImpl.java b/hibernate-entitymanager/src/main/java/org/hibernate/jpa/internal/QueryImpl.java index 67bf5a615a..5813243658 100755 --- a/hibernate-entitymanager/src/main/java/org/hibernate/jpa/internal/QueryImpl.java +++ b/hibernate-entitymanager/src/main/java/org/hibernate/jpa/internal/QueryImpl.java @@ -253,7 +253,7 @@ public class QueryImpl extends AbstractQueryImpl public void bindValue(T value, TemporalType specifiedTemporalType) { validateBinding( getParameterType(), value, specifiedTemporalType ); - if ( Date.class.isInstance( value ) ) { + if ( value == null || Date.class.isInstance( value ) ) { if ( name != null ) { if ( specifiedTemporalType == DATE ) { nativeQuery.setDate( name, (Date) value );