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

ThumbnailDocumentFactory throws NPE outside of a Servlet Context

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 8.10-HF16, 9.3-SNAPSHOT
    • Fix Version/s: 8.10-HF18, 9.3
    • Component/s: Thumbnail Service

      Description

      The ThumbnailDocumentFactory relies on the servlet context when trying to fetch the default icon for a document type. But, when the service is called outside of a servlet (like from a worker), then we have an NPE thrown.
      We should use this code instead:

      FileUtils.getResourceFileFromContext("nuxeo.war" + File.separator + icon)

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: