looks like in these "cases" the property jcr:mixinTypes exists, BUT
it is empty, hence
 JcrPropertyMap#convertToType(final CacheEntry entry, Class<T> type)
returns null (instead of the multivalued Property).
Whether this is correct or not is open to discussion...

> -----Original Message-----
> From: Clemens Wyss [mailto:clemens...@mysign.ch]
> Sent: Tuesday, August 31, 2010 10:38 AM
> To: 'dev@sling.apache.org'
> Subject: jcr:mixinTypes property cannot be "casted" to a
> javax.jcr.Property
>
>
> in the jQuery JCR explorer I iterate over the properties of a resource
> making use of org.apache.sling.api.resource.PersistableValueMap. I.e.
> var properties =
> resource.adaptTo(Packages.org.apache.sling.api.resource.Persis
> tableValueMap);
>
> I then try to "cast" the property to javax.jcr.Property,
>
> var property = properties.get( id, Packages.javax.jcr.Property );
>
> Now when I browse through /jcr:system/jcr:nodeTypes
> (e.g./jcr:system/jcr:nodeTypes/nt:folder) the property
> jcr:mixinTypes fails to cast. In these cases I fall back to the
> string representation of the property. In case of
> /jcr:system/jcr:nodeTypes/nt:folder I get something like:
>
> [Ljava.lang.Object;@dbd726
>
> BUT I would expect jcr:mixinTypes to be a multivalued Name property?
> Hence it should cast properly to Property.
>
> Also noticeable:
> I have no problems with the jcr:supertypes property, which is also
>  a multivalued Name property.
>

Reply via email to