Konrad Windszus created SLING-7924:
--------------------------------------

             Summary: ValidationModelRetriever does not correctly evaluate 
"applicable path"
                 Key: SLING-7924
                 URL: https://issues.apache.org/jira/browse/SLING-7924
             Project: Sling
          Issue Type: Bug
          Components: Validation
    Affects Versions: Validation Core 1.0.4
            Reporter: Konrad Windszus
            Assignee: Konrad Windszus
             Fix For: Validation Core 1.0.6


Currently in 
[https://github.com/apache/sling-org-apache-sling-validation-core/blob/4d56bb636a3b68cd1bed5d6b03f194a41e0aef75/src/main/java/org/apache/sling/validation/impl/ValidationModelRetrieverImpl.java#L114]
 there is a PatriciaTrie from Apache Commons Collections being used to figure 
out the validation model bound to a specific resource with the most specific 
applicable path which still matches.

This does not work as the method {{PatriciaTrie.subMap}} returns all keys which 
are less than the given path according to lexicographical ordering.

That means, in case the trie would contain entries for "/", and "/a/b", a 
lookup for "/a/c" would return "/a/b" although the latter does not start with 
the former.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to