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

ResourceMapper.getMapping() returns null for empty path and unreadable root

    XMLWordPrintableJSON

Details

    Description

      After the bug fix for SLING-9620, the behavior for ResourceMapper.getAllMappings() was changed such that the mappings list remains empty if the resourcePath provided is an empty string. Prior to this bug fix, the mappings list contained a single entry for empty path.

      Since mappings list is empty, ResourceMapper.getMapping() returns null. The javadoc of ResourceMapper.getMapping() API mentions that it will return a non null value if the resourcepath is not null.

      We need to decide on the expected behavior here. If mappings list should not be updated in case of empty resourcePath then the API annotation will have to be changed and it can potentially be a backwards incompatible issue in theory as the consumers of the API may not have added a null check to the return value.

      Attachments

        Issue Links

          Activity

            People

              cziegeler Carsten Ziegeler
              mohiaror Mohit Arora
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 3h 50m
                  3h 50m