You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by en...@apache.org on 2010/09/09 07:34:32 UTC
svn commit: r995316 -
/sling/trunk/bundles/extensions/bundleresource/src/main/java/org/apache/sling/bundleresource/impl/BundleResourceProvider.java
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();