Uploaded image for project: 'OpenIDM'
  1. OpenIDM
  2. OPENIDM-4692

ALL_GONE situation for deleted entries leads to NPE in JS

    Details

      Description

      When SynchronizationService is notified about a DELETED object:

      return newActionResponse(notifyDelete(context, resourceContainer, resourceId, request.getContent().get("oldValue"))).asPromise();
      

      Note the get("oldValue")... this returns null based JsonNode. Later on in the code a synchronization situation is assessed in ObjectMapping:

                          if (oldValue == null) {
                              // If there is no previous value known we can not correlate
                              situation = Situation.ALL_GONE;
                          } else {
                              // Correlate the old value to potential target(s)
                              JsonValue results = correlateTarget(oldValue);
      

      Please note that here only null equality check. But there should be also oldValue.isNull(). This failed check will lead in calling correlation and validation script with null source.

        Attachments

          Activity

            People

            • Assignee:
              dhogan Dirk Hogan
              Reporter:
              pavel.horal@orchitech.cz Pavel Horal [X] (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: