Hi,

On 21.05.2010 16:34, [email protected] wrote:
> Author: justin
> Date: Fri May 21 14:34:52 2010
> New Revision: 947026
> 
> URL: http://svn.apache.org/viewvc?rev=947026&view=rev
> Log:
> SLING-1527 - fixing listChildren() issue by both checking for 
> WrappedResources and removing the workspace prefix if necessary. Unit tests 
> use SyntheticResource to excercise the last bit.
> 
> Modified: 
> sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrResourceProvider.java
> URL: 
> http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrResourceProvider.java?rev=947026&r1=947025&r2=947026&view=diff
> ==============================================================================
> --- 
> sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrResourceProvider.java
>  (original)
> +++ 
> sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrResourceProvider.java
>  Fri May 21 14:34:52 2010
> +        } else if (parent instanceof ResourceWrapper) {
> +
> +            parentItemResource = (JcrItemResource) ((ResourceWrapper) 
> parent).getResource();

This is dangerous and may result in a ClassCastException if the wrapped
resource is not a JcrItemResource.

Regards
Felix

Reply via email to