I ran into a strange issue today where the sling:resourceType property
was multi-valued on one of my nodes.
This produced an error because this code from JcrItemResource assumes
it is a single-valued property:
if (node.hasProperty(JcrResourceConstants.SLING_RESOURCE_TYPE_PROPERTY))
{
result =
node.getProperty(JcrResourceConstants.SLING_RESOURCE_TYPE_PROPERTY).getValue().getString();
}
I was thinking that if sling:resourceType is multi-valued, the first
value should be used and a warning logged.
WDYT?
Justin