diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/JpaCriteriaParameter.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/JpaCriteriaParameter.java index 2cdabd62ac..e0be17f5c2 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/JpaCriteriaParameter.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/expression/JpaCriteriaParameter.java @@ -122,12 +122,13 @@ public class JpaCriteriaParameter @Override public BindableType getHibernateType() { - return this.getNodeType(); + return getNodeType(); } @Override public Class getParameterType() { - return this.getNodeType().getExpressibleJavaType().getJavaTypeClass(); + final SqmExpressible nodeType = getNodeType(); + return nodeType == null ? null : nodeType.getExpressibleJavaType().getJavaTypeClass(); } @Override