From 171488a762f0a2a8d15e76e7b26a581bf65b89dc Mon Sep 17 00:00:00 2001 From: Christian Beikov Date: Wed, 7 Aug 2024 16:12:48 +0200 Subject: [PATCH] HHH-18373 Fix NPE when accessing parameter type of JPA Criteria value parameter --- .../query/sqm/tree/expression/JpaCriteriaParameter.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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