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

!== in mergeWithTarget.js (and possibly other scripts) doesn't check if value is undefined only if value is null

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 6.0.0.1
    • Fix Version/s: 7.0.0
    • Component/s: None
    • Labels:
      None
    • Target Version/s:
    • Verified Version/s:
    • Story Points:
      2
    • Sprint:
      2019.6 - IDM
    • Support Ticket IDs:

      Description

      In mergeWithTarget.js there is a typo that is probably causing an issue. On line 37, it states:

      if (existingTargetObject != null && existingTargetObject[attributeName] !== null)

      {     mergeValues(targetObject, attributeName, existingTargetObject[attributeName]); }

      Notice the !== should be !=

      if (existingTargetObject != null && existingTargetObject[attributeName] != null)

      {    mergeValues(targetObject, attributeName, existingTargetObject[attributeName]); }

       

      !== checks if value is null but not if value is undefined.  

      Error in logs:

      Caused by: org.forgerock.json.resource.InternalServerErrorException: TypeError: Cannot read property "length" from undefined.  

      Believed to be as a results of the below line, where value is undefined:

      for (var x = 0; x < value.length; x++)

      If the above code didn't have a typo the for loop wouldn't have been reached.

       

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                travis.haagen Travis Haagen
                Reporter:
                margaret.rizkalla Margaret Rizkalla
                QA Assignee:
                Son Nguyen
              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: