Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-31860

Avoid NPE on StandardVersioningService#doCheckOut when baseVersion doc is deleted

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2023.0, 2021.38
    • Component/s: Core DBS

      Description

      A checkedIn document with a baseVersion that doesn't exist anymore, can raise the following NPE during a checkOut operation:

      java.lang.NullPointerException: null
      	at org.nuxeo.ecm.core.versioning.StandardVersioningService.doCheckOut(StandardVersioningService.java:374) ~[nuxeo-core-10.10-HF71.jar:?]
      	at org.nuxeo.ecm.core.versioning.StandardVersioningService.doPreSave(StandardVersioningService.java:325) ~[nuxeo-core-10.10-HF71.jar:?]
      	at org.nuxeo.ecm.core.versioning.VersioningComponent.doPreSave(VersioningComponent.java:423) ~[nuxeo-core-10.10-HF71.jar:?]
      	at org.nuxeo.ecm.core.api.AbstractSession.saveDocument(AbstractSession.java:1613) ~[nuxeo-core-10.10-HF71.jar:?]
      

      This is not a normal state, probably a transient state during deletion or the result of failure during deletion.

      StandardVersioningService#doCheckOut could log a warn and ignore the baseVersion instead of raising a NPE.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: