incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From enor...@apache.org
Subject svn commit: r995316 - /sling/trunk/bundles/extensions/bundleresource/src/main/java/org/apache/sling/bundleresource/impl/BundleResourceProvider.java
Date Thu, 09 Sep 2010 05:34:32 GMT
Author: enorman
Date: Thu Sep  9 05:34:32 2010
New Revision: 995316

URL: http://svn.apache.org/viewvc?rev=995316&view=rev
Log:
SLING-1733 - fix potential ClassCastException

Modified:
    sling/trunk/bundles/extensions/bundleresource/src/main/java/org/apache/sling/bundleresource/impl/BundleResourceProvider.java

Modified: sling/trunk/bundles/extensions/bundleresource/src/main/java/org/apache/sling/bundleresource/impl/BundleResourceProvider.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/bundleresource/src/main/java/org/apache/sling/bundleresource/impl/BundleResourceProvider.java?rev=995316&r1=995315&r2=995316&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/bundleresource/src/main/java/org/apache/sling/bundleresource/impl/BundleResourceProvider.java
(original)
+++ sling/trunk/bundles/extensions/bundleresource/src/main/java/org/apache/sling/bundleresource/impl/BundleResourceProvider.java
Thu Sep  9 05:34:32 2010
@@ -114,7 +114,7 @@ public class BundleResourceProvider impl
     public Iterator<Resource> listChildren(final Resource parent)
             throws SlingException {
 
-     	if (((BundleResource)parent).getBundle() == this.bundle) { 
+     	if (parent instanceof BundleResource && ((BundleResource)parent).getBundle()
== this.bundle) { 
             // bundle resources can handle this request directly when the parent
     		//  resource is in the same bundle as this provider.
             return ((BundleResource) parent).listChildren(); 



Mime
View raw message