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

Don't collect null documents in DocumentModelCollector to avoid a NPE when writing the response

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.8.0-HF33
    • Fix Version/s: 5.8.0-HF34, 6.0-HF12, 7.3
    • Component/s: Automation

      Description

      When invoking an operation that returns null (like Document.Delete) on list of documents , the output is collected into an object of type DocumentModelCollector. When the response is written this generates a NPE:

      at java.lang.Thread.run(Thread.java:722)
      17:10:24,803 ERROR [WebEngineExceptionMapper] Exception in JAX-RS processing
      javax.ws.rs.WebApplicationException
      at org.nuxeo.ecm.automation.jaxrs.io.documents.JsonDocumentListWriter.writeTo(JsonDocumentListWriter.java:105)
      at org.nuxeo.ecm.automation.jaxrs.io.documents.JsonDocumentListWriter.writeTo(JsonDocumentListWriter.java:58)
      at com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:306)

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: