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

ResourceResolver#getResource("") & ResourceResolver(".") should return null

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Critical
    • Resolution: Won't Fix
    • Resource Resolver 1.10.0
    • None
    • ResourceResolver
    • None

    Description

      We noticed that ResourceResolver#getResource is returning unexpected values for "" (empty string) and ".") (dot).

      We would expect null to be returned, however, instead we get an object whose toString is:
      SyntheticResource, type=sling:syntheticResourceProviderResource, path=/apps

      The sling.resolutionPath (in resource metadata) is set to /apps, which is also unexpected.

      Attachments

        1. screenshot-1.png
          47 kB
          Henry Kuijpers

        Activity

          People

            Unassigned Unassigned
            Henry Kuijpers Henry Kuijpers
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: