Skip to content
Snippets Groups Projects
Commit edf40897 authored by Adam Laskowski's avatar Adam Laskowski
Browse files

SSDM-55: Fixed properties setting to not trim data at the start

parent 846a91e5
No related branches found
No related tags found
1 merge request!40SSDM-13578 : 2PT : Database and V3 Implementation - include the new AFS "free"...
...@@ -336,12 +336,13 @@ public final class EntityPropertiesConverter implements IEntityPropertiesConvert ...@@ -336,12 +336,13 @@ public final class EntityPropertiesConverter implements IEntityPropertiesConvert
} }
} }
String propertyValue = value.toString().trim(); String propertyValue = value.toString();
if(propertyValue.isEmpty()) { if(propertyValue.trim().isEmpty()) {
return null; return null;
} }
if(propertyType.isMultiValue()) { if(propertyType.isMultiValue()) {
propertyValue = propertyValue.trim();
propertyValue = stripBracketsIfPresent(propertyValue); propertyValue = stripBracketsIfPresent(propertyValue);
if(propertyValue.isEmpty()) { if(propertyValue.isEmpty()) {
return null; return null;
...@@ -363,6 +364,7 @@ public final class EntityPropertiesConverter implements IEntityPropertiesConvert ...@@ -363,6 +364,7 @@ public final class EntityPropertiesConverter implements IEntityPropertiesConvert
} }
} else { } else {
if(ARRAY_TYPES.contains(propertyType.getType().getCode())) { if(ARRAY_TYPES.contains(propertyType.getType().getCode())) {
propertyValue = propertyValue.trim();
propertyValue = stripBracketsIfPresent(propertyValue); propertyValue = stripBracketsIfPresent(propertyValue);
return Arrays.stream(propertyValue.split(regex)) return Arrays.stream(propertyValue.split(regex))
.map(String::trim) .map(String::trim)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment