Hi,

sling:resourceType is not expected to be multi-value and the Node based
resources don't support it.

I am undecided: The keep-the-concepts-clean part of my mind says this
should be considered an error. On the other hand maybe just be graceful,
using the first value and log a warn message might be useful, too...

Regards
Felix

Am Samstag, den 12.02.2011, 01:30 +0000 schrieb Justin Edelson: 
> 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


Reply via email to