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

Fix NPE when manipulating the file source from a lazy binary

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.5
    • Fix Version/s: 5.5.0-HF04, 5.6-RC1, 5.6
    • Component/s: Core

      Description

      Because LazyBinary class doesn't have a specific implementation of getStreamSource(), the inner file is not computed, what leads to an NPE when trying to get information of corresponding file source:

      Caused by: java.lang.NullPointerException
      	at org.nuxeo.runtime.services.streaming.FileSource.getLength(FileSource.java:36)
      	at org.nuxeo.ecm.core.api.impl.blob.StreamingBlob.writeObject(StreamingBlob.java:206)
      

      => Override the inherited getStreamSource() method from Binary class

        Attachments

          Activity

            People

            • Assignee:
              tmartins Thierry Martins
              Reporter:
              tmartins Thierry Martins
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: