Description
the JCR specification mandates validation of the identifier during
value conversion from STRING to REFERENCE or WEAK_REFERENCE:
<quote from 3.6.4.1 From STRING To)>
REFERENCE or WEAKREFERENCE: If the string is a syntactically valid
identifier, according to the implementation, it is converted directly, otherwise a
ValueFormatException is thrown. The identifier is not required to be that of an
existing node in the current workspace.
<end_quote>
the current ValueFactory implementation in oak-jcr lacks that validation:
creating a REFERENCE or WEAKREFERENCE value using
ValueFactory#createValue(String, int) succeeds even if the specified string
isn't a valid referenceable node identifier.