Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Resource Resolver 1.10.0
-
None
Description
While investigation repository access I found that a ResourceResolver.map() call invokes ResourceResolver.resolveInternal() twice for the same resource.
See these parts of the call stack:
at org.apache.sling.resourceresolver.impl.ResourceResolverImpl.getAbsoluteResourceInternal(ResourceResolverImpl.java:901) [org.apache.sling.resourceresolver:1.10.0] at org.apache.sling.resourceresolver.impl.ResourceResolverImpl.resolveInternal(ResourceResolverImpl.java:727) [org.apache.sling.resourceresolver:1.10.0] at org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl.getAllMappings(ResourceMapperImpl.java:145) [org.apache.sling.resourceresolver:1.10.0] at org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl.getMapping(ResourceMapperImpl.java:73) [org.apache.sling.resourceresolver:1.10.0] at org.apache.sling.resourceresolver.impl.ResourceResolverImpl.map(ResourceResolverImpl.java:445) [org.apache.sling.resourceresolver:1.10.0]
at org.apache.sling.resourceresolver.impl.ResourceResolverImpl.resolveInternal(ResourceResolverImpl.java:384) [org.apache.sling.resourceresolver:1.10.0] at org.apache.sling.resourceresolver.impl.ResourceResolverImpl.resolve(ResourceResolverImpl.java:256) [org.apache.sling.resourceresolver:1.10.0] at org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl.loadAliasesIfApplicable(ResourceMapperImpl.java:220) [org.apache.sling.resourceresolver:1.10.0] at org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl.getAllMappings(ResourceMapperImpl.java:147) [org.apache.sling.resourceresolver:1.10.0] at org.apache.sling.resourceresolver.impl.mapping.ResourceMapperImpl.getMapping(ResourceMapperImpl.java:73) [org.apache.sling.resourceresolver:1.10.0] at org.apache.sling.resourceresolver.impl.ResourceResolverImpl.map(ResourceResolverImpl.java:445) [org.apache.sling.resourceresolver:1.10.0]
In ResourceResolverMapperImpl.loadAliasesIfApplicable() a resolved resource is passed, and when no alias is encountered the same resource will be resolved again in line 220.
Attachments
Issue Links
- links to