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

ResourceResolverImpl.isResourceType() should compare relative resource types (and ignore any search path prefixes)

    XMLWordPrintableJSON

Details

    Description

      Currently the following two expressions return false
      ResourceResolverImpl.isResourceType(<Resource with resourceType="sling/some/type">, "/libs/sling/some/type"
      ResourceResolverImpl.isResourceType(<Resource with resourceType="/libs/sling/some/type">, "sling/some/type"

      Since it cannot always be influenced whether the given resource is absolute or relative (because both usually works from a rendering perspective when you talk about the current request's resource), both cases should actually return true.

      See also the related discussion at http://www.mail-archive.com/dev@sling.apache.org/msg62351.html

      Attachments

        1. SLING-6327-v01.patch
          10 kB
          Konrad Windszus

        Activity

          People

            kwin Konrad Windszus
            kwin Konrad Windszus
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: