Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-2152

NullPointerException When Removing A Version

XMLWordPrintable

    • Hide

      1. submit version 1.1
      2. restore to version 1.1
      3. submit a new version 1.1.0
      4. remove version 1.1

      Show
      1. submit version 1.1 2. restore to version 1.1 3. submit a new version 1.1.0 4. remove version 1.1

      NullPointerException When remove a version which ever act as a restore point. For example, version 1.1, then I restore to version 1.1, then submit a new version, its name should be 1.1.0. When remove version 1.1, throw NullPointerException. After Investigate code the successors of version 1.1 is null,
      original code in removeVerision of JcrVersionHistoryNode:

          predecessors.getValues()
          addValuesNotInSet(successors.getValues(), newNodeSuccessors, versionId, addedValues);
          successors.getValues()
          addValuesNotInSet(predecessors.getValues(), newNodePredecessors, versionId, addedValues);
      

      If I add null check before invoke these method, it function well.

              hchiorean Horia Chiorean (Inactive)
              angelo.chen Angelo Chen (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: