Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-2900

Trying to remove a non existing element from a map might cause NPE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • 1.3.0, 1.4
    • segmentmk
    • None

    Description

      Calling SegmentWriter.writeMap(base, changes) with changes containing mappings to null (meaning to remove the respective key) can result in a NPE if base doesn't contain that key.

      I came across this while working on the PersistedCompactionMap in OAK-2862. I had to add an extra check for above case as otherwise I'd occasionally hit said NPE.

      Need yet to extract a proper test case.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mduerig Michael Dürig
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: