Uploaded image for project: 'Xray for Jira'
  1. Xray for Jira
  2. XRAY-8743

Document generator fails and throws a NPE when a Jira attachment's Mime type is null

    XporterXMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 6.2.8
    • Document Generator
    • None
    • Xray 2022 S15
    • OK

    Description

      Document generator fails and throws a NPE when processing a Jira attachment's with a null Mime type

      java.lang.NullPointerException at com.xpandit.raven.document.generator.mapping.helper.AttachmentHelper.lambda$getImages$0(AttachmentHelper.java:158) at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:176) at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578) at com.xpandit.raven.document.generator.mapping.helper.AttachmentHelper.getImages(AttachmentHelper.java:180) at com.xpandit.raven.document.generator.mapping.issuefield.simple.ImagesMapper.getMapping(ImagesMapper.java:94) at com.xpandit.raven.document.generator.mapping.issuefield.IssueFieldMapper.lambda$null$1(IssueFieldMapper.java:178) at java.base/java.util.Optional.map(Optional.java:265) at com.xpandit.raven.document.generator.mapping.issuefield.IssueFieldMapper.lambda$getMapping$2(IssueFieldMapper.java:61) at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:271) at java.base/java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1621) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578) at com.xpandit.raven.document.generator.mapping.issuefield.IssueFieldMapper.getMapping(IssueFieldMapper.java:360) at com.xpandit.raven.document.generator.mapping.FieldMapperFactory.lambda$getMapping$1(FieldMapperFactory.java:98) at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:271) at java.base/java.util.HashMap$EntrySpliterator.forEachRemaining(HashMap.java:1764) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578) at com.xpandit.raven.document.generator.mapping.FieldMapperFactory.getMapping(FieldMapperFactory.java:109) at com.xpandit.raven.document.generator.mapping.MultiFieldMapper.lambda$processFields$2(MultiFieldMapper.java:85) at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:271) at java.base/java.util.stream.IntPipeline$1$1.accept(IntPipeline.java:180) at java.base/java.util.stream.Streams$RangeIntSpliterator.forEachRemaining(Streams.java:104) at java.base/java.util.Spliterator$OfInt.forEachRemaining(Spliterator.java:699) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578) at com.xpandit.raven.document.generator.mapping.xrayfields.iteration.TestMapper.getMapping(TestMapper.java:101) at com.xpandit.raven.document.generator.mapping.xrayfields.XrayFieldMapper.lambda$getField$2(XrayFieldMapper.java:99) at java.base/java.util.Optional.map(Optional.java:265) at com.xpandit.raven.document.generator.mapping.xrayfields.XrayFieldMapper.getField(XrayFieldMapper.java:82) at com.xpandit.raven.document.generator.mapping.xrayfields.XrayFieldMapper.lambda$getMapping$0(XrayFieldMapper.java:77) at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:271) at java.base/java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1621) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578) at com.xpandit.raven.document.generator.mapping.xrayfields.XrayFieldMapper.getMapping(XrayFieldMapper.java:78) at com.xpandit.raven.document.generator.mapping.FieldMapperFactory.lambda$getMapping$1(FieldMapperFactory.java:92) at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:271) at java.base/java.util.HashMap$EntrySpliterator.forEachRemaining(HashMap.java:1764) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578) at com.xpandit.raven.document.generator.mapping.FieldMapperFactory.getMapping(FieldMapperFactory.java:109) at com.xpandit.raven.service.impl.document.generator.IssueMappingServiceImpl.lambda$getChunkMappings$2(IssueMappingServiceImpl.java:213) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578) at com.xpandit.raven.service.impl.document.generator.IssueMappingServiceImpl.getChunkMappings(IssueMappingServiceImpl.java:215) at com.xpandit.raven.service.impl.document.generator.IssueMappingServiceImpl.lambda$getMappings$1(IssueMappingServiceImpl.java:166) at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:271) at java.base/java.util.stream.IntPipeline$1$1.accept(IntPipeline.java:180) at java.base/java.util.stream.SliceOps$2$1.accept(SliceOps.java:308) at java.base/java.util.stream.IntStream$1.tryAdvance(IntStream.java:922) at java.base/java.util.stream.IntPipeline.forEachWithCancel(IntPipeline.java:163) at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578) at com.xpandit.raven.service.impl.document.generator.IssueMappingServiceImpl.getMappings(IssueMappingServiceImpl.java:168) at com.xpandit.raven.document.generator.engine.impl.DocumentBuildLookupImpl.getIssueMappingList(DocumentBuildLookupImpl.java:517) at com.xpandit.raven.document.generator.engine.impl.DocumentBuildLookupImpl.lookup(DocumentBuildLookupImpl.java:411) at com.xpandit.raven.queue.ExportRunner.run(ExportRunner.java:179) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829)
      
      
      

      Attachments

        Activity

          People

            masg Marco Guedes
            fmtc Fabio Cunha
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: