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

NullPointerException possible during item browsing

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.7.1
    • Fix Version/s: 1.8.0
    • Component/s: DSpace API
    • Labels:
      None
    • Attachments:
      1
    • Comments:
      2

      Description

      Under some circumstances GoogleMetadata class can throw a NullPointerException.
      (dspace-api/src/main/java/org/dspace/app/util/GoogleMetadata.java).

      Exception occurs if for some reason value of mapped filed is Null.
      Fix is very simple:

      from line #268
      DCValue v = resolveMetadataField(config);

      • if (null != v && !v.value.trim().equals(""))
        + if (null != v && (null != v.value) && !v.value.trim().equals(""))
        {
        metadataMappings.put(fieldName, v.value);
        return true;

        Attachments

          Activity

            People

            Assignee:
            robintaylor Robin Taylor
            Reporter:
            sden Denys Slipetskyy
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 minute
                1m
                Remaining:
                Remaining Estimate - 1 minute
                1m
                Logged:
                Time Spent - Not Specified
                Not Specified