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

Fix NPE in MimeTypeTranslationHelper

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 10.10
    • Fix Version/s: 10.10-HF35, 11.4, 2021.0
    • Component/s: Convert
    • Tags:
    • Backlog priority:
      600
    • Sprint:
      CB Sprint 2
    • Story Points:
      2

      Description

      This line https://github.com/nuxeo/nuxeo/blob/10.10/nuxeo-core/nuxeo-core-convert/src/main/java/org/nuxeo/ecm/core/convert/service/MimeTypeTranslationHelper.java#L162 could cause this NPE

      ERROR [http-nio-0.0.0.0-8080-exec-10] [org.nuxeo.ecm.webengine.app.WebEngineExceptionMapper] java.lang.NullPointerException
      java.lang.NullPointerException: null
          at org.nuxeo.ecm.core.convert.service.MimeTypeTranslationHelper.lambda$getConverterNames$2(MimeTypeTranslationHelper.java:162) ~[nuxeo-core-convert-10.10-HF10.jar:?]
          at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174) ~[?:1.8.0_252]
          at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) ~[?:1.8.0_252]
          at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[?:1.8.0_252]
          at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) ~[?:1.8.0_252]
          at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[?:1.8.0_252]
          at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_252]
          at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566) ~[?:1.8.0_252]
          at org.nuxeo.ecm.core.convert.service.MimeTypeTranslationHelper.getConverterNames(MimeTypeTranslationHelper.java:164) ~[nuxeo-core-convert-10.10-HF10.jar:?]
          at org.nuxeo.ecm.core.convert.service.MimeTypeTranslationHelper.getConverterName(MimeTypeTranslationHelper.java:93) ~[nuxeo-core-convert-10.10-HF10.jar:?]
          at org.nuxeo.ecm.core.convert.service.ConversionServiceImpl.getConverterName(ConversionServiceImpl.java:430) ~[nuxeo-core-convert-10.10-HF10.jar:?]
          at org.nuxeo.ecm.core.convert.api.ConversionService.getConverterName(ConversionService.java:47) ~[nuxeo-core-convert-api-10.10-HF03.jar:?]
          at org.nuxeo.ecm.platform.preview.adapter.base.ConverterBasedHtmlPreviewAdapter.getPreviewBlobs(ConverterBasedHtmlPreviewAdapter.java:163) ~[nuxeo-preview-core-10.10-HF16.jar:?]
          at org.nuxeo.ecm.platform.preview.adapter.base.ConverterBasedHtmlPreviewAdapter.getPreviewBlobs(ConverterBasedHtmlPreviewAdapter.java:124) ~[nuxeo-preview-core-10.10-HF16.jar:?]
          at org.nuxeo.ecm.platform.preview.adapter.base.AbstractHtmlPreviewAdapter.getFilePreviewBlobs(AbstractHtmlPreviewAdapter.java:121) ~[nuxeo-preview-core-10.10-HF16.jar:?]
          at org.nuxeo.ecm.restapi.server.jaxrs.adapters.PreviewAdapter.getPreviewBlobs(PreviewAdapter.java:175) ~[nuxeo-rest-api-server-10.10-HF27.jar:?]
          at org.nuxeo.ecm.restapi.server.jaxrs.adapters.PreviewAdapter.preview(PreviewAdapter.java:89) ~[nuxeo-rest-api-server-10.10-HF27.jar:?]
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_252]
       

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: