Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-2518

Exception thrown from jcrPropertyMap.containsKey("")

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • JCR Resource 2.1.0
    • JCR Resource 2.2.0
    • JCR
    • None

    Description

      There is a little regression updating org.apache.sling.jcr.resource from version 2.0.10 to version 2.1

      The same call to the JcrPropertyMap#containsKey that used to work in the former version fails in the latest with stacktrace

      java.lang.IllegalArgumentException: javax.jcr.RepositoryException: failed to resolve path relative to node /test1340468918488
      at org.apache.sling.jcr.resource.JcrPropertyMap.read(JcrPropertyMap.java:355)
      at org.apache.sling.jcr.resource.JcrPropertyMap.get(JcrPropertyMap.java:162)
      at org.apache.sling.jcr.resource.JcrPropertyMap.containsKey(JcrPropertyMap.java:171)
      at org.apache.sling.jcr.resource.internal.JcrPropertyMapTest.testDefaultValue(JcrPropertyMapTest.java:206)
      at org.apache.sling.jcr.resource.internal.JcrPropertyMapTest.testDefaultValue(JcrPropertyMapTest.java:134)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      if containsKey empty string argument e.g. jcrPropertyMap.containsKey("").
      Up to version 2.0.10 jcrPropertyMap.containsKey("") returned false.

      See also [0]

      [0] sling.markmail.org/message/y4bcxpsreyzt4bwd

      Attachments

        1. SLING-2518-test.txt
          0.8 kB
          Antonio Sanso

        Activity

          People

            cziegeler Carsten Ziegeler
            asanso Antonio Sanso
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: