diff --git a/server-application-server/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/EntityPropertiesConverter.java b/server-application-server/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/EntityPropertiesConverter.java index f7c34cdc70630470484001f0d83f04c5350335a1..d3f66175125bb2870f4a7f6e15b5a9e95736193b 100644 --- a/server-application-server/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/EntityPropertiesConverter.java +++ b/server-application-server/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/EntityPropertiesConverter.java @@ -336,12 +336,13 @@ public final class EntityPropertiesConverter implements IEntityPropertiesConvert } } - String propertyValue = value.toString().trim(); - if(propertyValue.isEmpty()) { + String propertyValue = value.toString(); + if(propertyValue.trim().isEmpty()) { return null; } if(propertyType.isMultiValue()) { + propertyValue = propertyValue.trim(); propertyValue = stripBracketsIfPresent(propertyValue); if(propertyValue.isEmpty()) { return null; @@ -363,6 +364,7 @@ public final class EntityPropertiesConverter implements IEntityPropertiesConvert } } else { if(ARRAY_TYPES.contains(propertyType.getType().getCode())) { + propertyValue = propertyValue.trim(); propertyValue = stripBracketsIfPresent(propertyValue); return Arrays.stream(propertyValue.split(regex)) .map(String::trim)