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

MapEntries: Invalid logic around added/changed/removed property names

    XMLWordPrintableJSON

Details

    Description

      The SLING-6000 changes have introduced code that looks incorrect and breaks a number of integration tests (MappingEventsProxyTest, ResourceResolverProxyTest, VanityPathTest) as (for example) changing a single property of a map entry does not cause MapEntries to send events anymore.

      In the affected code below, from the MapEntries class, the changedAttributes and removedAttributes section are not reached if addedAttributes is null, I don't think that's intentional.

      cziegeler could you have a look? I have assigned this to you as IIUC you wrote that SLING-6000 code.

      This is blocking SLING-5135 but I'll commit that code and disable the affected integration tests until this is fixed.

      Set<String> addedAttributes = rc.getAddedPropertyNames();
      if (addedAttributes != null) {
        ...
        wasResolverRefreshed = doAddAttributes(path, addedAttributes, wasResolverRefreshed);
        ...
        Set<String> changedAttributes = rc.getChangedPropertyNames();
        ...
        Set<String> removedAttributes = rc.getRemovedPropertyNames();
      } else {
      

      Attachments

        Issue Links

          Activity

            People

              cziegeler Carsten Ziegeler
              bdelacretaz Bertrand Delacretaz
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: