From dccb6b80d5c5b8718b311bc59c5e3217f77c9087 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Sat, 7 Dec 2024 16:50:46 +0100 Subject: [PATCH] [FIX] check null pointer in condition for SQL --- src/org/kar/archidata/dataAccess/DataAccess.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/org/kar/archidata/dataAccess/DataAccess.java b/src/org/kar/archidata/dataAccess/DataAccess.java index 48ff408..169827f 100644 --- a/src/org/kar/archidata/dataAccess/DataAccess.java +++ b/src/org/kar/archidata/dataAccess/DataAccess.java @@ -1246,6 +1246,10 @@ public class DataAccess { public static void addElement(final PreparedStatement ps, final Object value, final CountInOut iii) throws Exception { + if (value == null) { + ps.setNull(iii.value, Types.INTEGER); + return; + } if (value instanceof final UUID tmp) { final byte[] dataByte = UuidUtils.asBytes(tmp); ps.setBytes(iii.value, dataByte);