Resource resolver sets resolution path and resolution path info wrong when
resolving resources with sling:alias
---------------------------------------------------------------------------------------------------------------
Key: SLING-1104
URL: https://issues.apache.org/jira/browse/SLING-1104
Project: Sling
Issue Type: Bug
Components: JCR Resource
Affects Versions: JCR Resource 2.0.4
Reporter: Felix Meschberger
Assignee: Felix Meschberger
Fix For: JCR Resource 2.0.6
If resources use the sling:alias property to alias its name, the resource
resolver sets the resolution path and resolution path info resource metadata
wrong:
* resolution path is not the part of the path leading to the resolution but
the path of the actual resource
* resolution path info is wrong if more than one alias is along the resource
path (and the alias names do not have the same length)
For example:
..../child
+- sling:alias = kind // shorter than node name
+- grandchild
+- sling:alias = enkel // shorter than node name
Now resolving ".../kind.html" to a resource sets the meta data as follows:
resolution path = ".../child" -- expected ".../kind"
resolution path info = ".html" -- correct
Resolving ".../kind/enkel.html" to a resource breaks things up completely:
resolution path = ".../child/grandchild" -- expected
".../kind/enkel"
resolution path info = "html" -- expected
".html"
The bug is in the path calculation of the
JcrResourceResolver2.resolveInternal(String) method where aliases are handled.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.