Details
-
Bug
-
Resolution: Done
-
Major
-
3.0.0.Final
-
None
Description
Create a multi-value property of reference type, then doing the following will give truncated node identifiers:
Property prop = node.getProperty("propname"); Value[] values = prop.getValues(); for (Value value : values) { String referencedId = value.getString(); // the ID is truncated! Node node = session.getNodeByIdentifier(referenceId); // throws ItemNotFoundException }
After some brief investigation it seems that the fault might be in DocumentTranslator.createReferenceFromString where valueStr only contains the node identifier with no source or workspace keys. This is passed to the NodeKey(String) constructor, where it expects a key but instead receives an identifier.
When NodeKey.getIdentifier() is called later, the identifier is truncated, as the NodeKey was not constructed correctly.