[FIX] check null pointer in condition for SQL

This commit is contained in:
Edouard DUPIN 2024-12-07 16:50:46 +01:00
parent 5633604d13
commit dccb6b80d5

View File

@ -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);