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

Refactor redundant checks for null in TokenValidator

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.14.0
    • Component/s: core, security
    • Labels:
      None

      Description

      Alex Deparvu, due to missing nullability annotations in org.apache.jackrabbit.oak.spi.commit,Validator interface, some old implementations in the security code base like TokenValidator perform redundant checks for null that would only occur in case of invalid sequences of Validator.childNodeAdded followed by Validator.childNodeChanged (or similar examples with delete/add and delete/change). I would prefer to verify the expected non-null state and have the subsequent not perform extra checks for null that are never executed.

        Attachments

        1. OAK-8323.patch
          7 kB
          Angela Schreiber

          Activity

            People

            • Assignee:
              angela Angela Schreiber
              Reporter:
              angela Angela Schreiber
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: