From f280e60562d5d9924f4abe44644b98299a0a29b3 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Fri, 4 Aug 2023 15:57:40 +0300 Subject: [PATCH] Fix StringListConverter to add empty string in database column if the array is empty. --- .../java/eu/dnetlib/developers/utils/StringListConverter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/eu/dnetlib/developers/utils/StringListConverter.java b/src/main/java/eu/dnetlib/developers/utils/StringListConverter.java index 5d63bed..ef1568c 100644 --- a/src/main/java/eu/dnetlib/developers/utils/StringListConverter.java +++ b/src/main/java/eu/dnetlib/developers/utils/StringListConverter.java @@ -12,7 +12,7 @@ public class StringListConverter implements AttributeConverter, Str @Override public String convertToDatabaseColumn(List attribute) { if (attribute == null || attribute.isEmpty()) { - return null; + return ""; } return String.join(ARRAY_DELIMITER, attribute); }