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

Unexpected behavior with left curly bracket in resource resolution

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: ResourceResolver
    • Labels:
      None

      Description

      The attached test.jsp script produces the below output, in which cases 4 to 7 are suprising.

      Given an existing resource R (/libs here) it looks like adding a sub-path to R's path which starts with a left curly bracket causes the resolver to return R instead of a non-existing resource.

      The returned resource has the full path that was resolved, not R's path, but adapTo(Node.class) returns R's node.

      1 /libs
        (sling:Folder)
        JCR:/libs
      
      2 /libs/sub
        (sling:nonexisting)
      
      3 /libs/sub/end
        (sling:nonexisting)
      
      4 /libs/{end
        (sling:Folder)
        JCR:/libs
      
      5 /libs/{sub/end
        (sling:Folder)
        JCR:/libs
      
      6 /libs/{sub/more/end
        (sling:Folder)
        JCR:/libs
      
      7 /libs/{sub/end
        (sling:Folder)
        JCR:/libs
      
      8 /libs/}sub/end
        (sling:nonexisting)
      
      9 /libs/{sub}/end
        (sling:nonexisting)
      
      10 /libs/sub/{end
        (sling:nonexisting)
      
      11 /libs/sub/}end
        (sling:nonexisting)
      
      12 /libs/sub/{end}
        (sling:nonexisting)
      

        Attachments

        1. test.jsp
          1 kB
          Bertrand Delacretaz

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                bdelacretaz Bertrand Delacretaz
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: