Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-27

NullPointerException possible in review.jsp - ID: 1571645

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.5.2
    • Component/s: JSPUI
    • Labels:
      None
    • Environment:
      submission/ ingest
    • Attachments:
      0
    • Comments:
      1

      Description

      In layoutSection, if inputType.equals("dropdown"),
      Utils.addEntities is passed the result of
      DCInput.getDisplayString(). getDisplayString is
      documented to return null if the input stored-value is
      not matched, which will cause addEntities to throw a
      NPE. The code should probably look more like the
      "qualdrop_value" case below it, i.e. change:

      row.append(Utils.addEntities(displayVal));

      to:

      if (displayVal != null)
      {
      row.append(Utils.addEntities(displayVal));
      }

      I am still working the problem report, but I believe
      that I've seen this NPE thrown in practice. In any
      case the code in review.jsp does not gracefully handle
      a documented return value.

      BTW the doc comments for getDisplayString (and
      getStoredString) don't seem to match the code.

        Attachments

          Activity

            People

            • Assignee:
              cjuergen Claudia Jürgen
              Reporter:
              kipkorir2008 Charles Kiplagat
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: