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

Fix NPE in BlobsExtractor#findBlobsProperties

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.10
    • Fix Version/s: 10.10-HF34, 11.4, 2021.0
    • Component/s: Core
    • Backlog priority:
      750
    • Sprint:
      nxplatform #19, nxplatform #20
    • Story Points:
      1

      Description

      In a case where blobs are added to a multivalued complex property, a NPE is thrown by BlobsExtractor#findBlobsProperties

      Steps to reproduce

      1. Deploy the attached jar to nxserver/plugins
      2. Start Nuxeo and switch to the JSF view
      3. Go to a Workspace
      4. Click on the New button and choose the type VeryComplex
      5. For the "instances" field, add 2 values
      6. Fill all the fields but "Val Test" which should remain empty
      7. Click on the Create button

      Observe that there is a NPE in the logs when MimetypeIconUpdater tries to read all the blobs.

      2020-09-23T18:37:14,498 ERROR [EventServiceImpl] Exception during mimetypeIconUpdater sync listener execution, continuing to run other listeners
      java.lang.NullPointerException: null
      	at org.nuxeo.ecm.core.utils.BlobsExtractor.findBlobsProperties(BlobsExtractor.java:182) ~[nuxeo-core-api-10.10-HF31.jar:?]
      	at org.nuxeo.ecm.core.utils.BlobsExtractor.findBlobsProperties(BlobsExtractor.java:189) ~[nuxeo-core-api-10.10-HF31.jar:?]
      	at org.nuxeo.ecm.core.utils.BlobsExtractor.getBlobsProperties(BlobsExtractor.java:154) ~[nuxeo-core-api-10.10-HF31.jar:?]
      	at org.nuxeo.ecm.platform.filemanager.core.listener.MimetypeIconUpdater.handleEvent(MimetypeIconUpdater.java:93) ~[nuxeo-platform-filemanager-core-listener-10.10-HF31.jar:?]
      

      Note that in other circumstances, it's also possible to crash the ZIP export.

      Expected behavior: there is no exception where this document type is created.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 hours
                  4h