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

RequestItem.isAccept_request() can NPE if setAccept_request() was never called.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Code Review Needed (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 7.0
    • Component/s: API
    • Attachments:
      0
    • Comments:
      0
    • Documentation Status:
      Not Required

      Description

      RequestItem keeps its "accepted" state in a Boolean object, which has no explicit initializer and thus starts out as a null reference.  isAccept_request() returns a boolean primitive.  It unconditionally returns the Boolean, which will be auto-unboxed, and if null we get a NullPointerException.

        Attachments

          Activity

            People

            • Assignee:
              mwood Mark H. Wood
              Reporter:
              mwood Mark H. Wood
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: