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

API: Un-deprecate ResourceUtil.getValueMap method

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • API 2.8.0
    • API 2.9.0
    • API
    • None

    Description

      the method ResourceUtil.getValueMap(<Resource>) is deprecated since rev. 1577527 (in context of SLING-3453/SLING-3451) referring to Resource.getValueMap().

      but these two methods are not fully equivalent from a convenience perspective: ResourceUtil.getValueMap supports returning an empty map if the resource is null, while for the Resource.getValueMap() an explicit null check and returning an empty map has to be implemented by the caller, which is too much boilerplate code.

      the simplest solution would be to just undeprecate it. patch attached.

      Attachments

        1. 140827_SLING-3887_getValueMap.patch
          0.7 kB
          Stefan Seifert

        Issue Links

          Activity

            People

              cziegeler Carsten Ziegeler
              sseifert Stefan Seifert
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: