From 0f291a8d8d64b33c11e253464bdac34299794068 Mon Sep 17 00:00:00 2001 From: Christian Beikov Date: Tue, 5 Mar 2024 16:00:53 +0100 Subject: [PATCH] HHH-17808 NPE when null vector is read with VectorJdbcType --- .../src/main/java/org/hibernate/vector/VectorJdbcType.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hibernate-vector/src/main/java/org/hibernate/vector/VectorJdbcType.java b/hibernate-vector/src/main/java/org/hibernate/vector/VectorJdbcType.java index 031ef391d8..4b3636c139 100644 --- a/hibernate-vector/src/main/java/org/hibernate/vector/VectorJdbcType.java +++ b/hibernate-vector/src/main/java/org/hibernate/vector/VectorJdbcType.java @@ -68,6 +68,9 @@ public class VectorJdbcType extends ArrayJdbcType { } private float[] getFloatArray(String string) { + if ( string == null ) { + return null; + } if ( string.length() == 2 ) { return EMPTY; }