REPO-1684: We should not return properties that are empty

- Empty (zero length) string values are considered to be null values, and will be represented the same as null values (i.e. by non-existence of the property).

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@134045 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Cristian Turlica
2017-01-05 08:24:09 +00:00
parent dee0895e4a
commit 236cd318aa
4 changed files with 63 additions and 0 deletions

View File

@@ -1197,6 +1197,15 @@ public class NodesImpl implements Nodes
{
value = Node.lookupUserInfo((String)value, mapUserInfo, sr.getPersonService());
}
// Empty (zero length) string values are considered to be
// null values, and will be represented the same as null
// values (i.e. by non-existence of the property).
if (value != null && value instanceof String && ((String) value).isEmpty())
{
continue;
}
props.put(qName.toPrefixString(namespaceService), value);
}
}