JcrResourceResolver.map(" ") throws NPE with unintuitive stack trace
--------------------------------------------------------------------

                 Key: SLING-2367
                 URL: https://issues.apache.org/jira/browse/SLING-2367
             Project: Sling
          Issue Type: Improvement
          Components: JCR
            Reporter: Justin Edelson
            Priority: Minor


Stack trace is currently java.lang.NullPointerException
        at 
org.apache.sling.jcr.resource.internal.JcrResourceResolver.mangleNamespaces(JcrResourceResolver.java:1290)
        at 
org.apache.sling.jcr.resource.internal.JcrResourceResolver.map(JcrResourceResolver.java:756)
        at 
org.apache.sling.jcr.resource.internal.JcrResourceResolver.map(JcrResourceResolver.java:545)

when " " is passed to map().

This should be either an IllegalArgumentException with a descriptive message OR 
return the root node (to be consistent with mapping "")

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to