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

SSDM-55: fixed NewProperty data deserialization

parent 833ef3e9
No related branches found
No related tags found
1 merge request!40SSDM-13578 : 2PT : Database and V3 Implementation - include the new AFS "free"...
...@@ -58,7 +58,7 @@ public class NewProperty implements Serializable ...@@ -58,7 +58,7 @@ public class NewProperty implements Serializable
public String getValue() public String getValue()
{ {
return (String) value; return getPropertyAsString(value);
} }
@BeanProperty(label = "value", optional = false) @BeanProperty(label = "value", optional = false)
...@@ -98,4 +98,25 @@ public class NewProperty implements Serializable ...@@ -98,4 +98,25 @@ public class NewProperty implements Serializable
return false; return false;
} }
private String getPropertyAsString(Serializable propertyValue) {
if(propertyValue == null) {
return null;
} else {
if(propertyValue.getClass().isArray()) {
Serializable[] values = (Serializable[]) propertyValue;
StringBuilder builder = new StringBuilder("[");
for(Serializable value : values) {
if(builder.length() > 1) {
builder.append(", ");
}
builder.append(value);
}
builder.append("]");
return builder.toString();
} else {
return (String) propertyValue;
}
}
}
} }
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