You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2010/04/13 17:45:43 UTC
svn commit: r933687 -
/sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/request/SlingRequestDispatcher.java
Author: cziegeler
Date: Tue Apr 13 15:45:43 2010
New Revision: 933687
URL: http://svn.apache.org/viewvc?rev=933687&view=rev
Log:
SLING-1487 : TypeOverwritingResourceWrapper should return null as resource super type
Modified:
sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/request/SlingRequestDispatcher.java
Modified: sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/request/SlingRequestDispatcher.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/request/SlingRequestDispatcher.java?rev=933687&r1=933686&r2=933687&view=diff
==============================================================================
--- sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/request/SlingRequestDispatcher.java (original)
+++ sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/request/SlingRequestDispatcher.java Tue Apr 13 15:45:43 2010
@@ -26,11 +26,11 @@ import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+
import org.apache.sling.api.SlingConstants;
import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.api.request.RequestDispatcherOptions;
import org.apache.sling.api.resource.Resource;
-import org.apache.sling.api.resource.ResourceUtil;
import org.apache.sling.api.resource.ResourceWrapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -235,17 +235,10 @@ public class SlingRequestDispatcher impl
private static class TypeOverwritingResourceWrapper extends ResourceWrapper {
- /** marker value for the resourceSupertType before trying to evaluate */
- private static final String UNSET_RESOURCE_SUPER_TYPE = "<unset>";
-
private final String resourceType;
-
- private String resourceSuperType;
-
TypeOverwritingResourceWrapper(Resource delegatee, String resourceType) {
super(delegatee);
this.resourceType = resourceType;
- this.resourceSuperType = UNSET_RESOURCE_SUPER_TYPE;
}
public String getResourceType() {
@@ -253,17 +246,12 @@ public class SlingRequestDispatcher impl
}
/**
- * Overwrite this here because the wrapped resource will return a super
- * type based on the resource type of the wrapped resource instead of
- * the resource type overwritten here
+ * Overwrite this here because the wrapped resource will return null as
+ * a super type instead of the resource type overwritten here
*/
@Override
public String getResourceSuperType() {
- if (resourceSuperType == UNSET_RESOURCE_SUPER_TYPE) {
- resourceSuperType = ResourceUtil.getResourceSuperType(
- this.getResourceResolver(), this.resourceType);
- }
- return resourceSuperType;
+ return null;
}
}
}
\ No newline at end of file