-
Bug
-
Resolution: Fixed
-
Neutral
-
None
-
None
-
DevX 22
-
2
This bug affects webhooks version 1.0.0, it's already fixed on master
It happens when a ContentTypeChangedEvent is going to be processed, and there are webhook definitions with events without entity, which is optional and shouldn't cause NPE:
2022-09-06 09:47:18,185 ERROR [http-nio-8081-exec-6] info.magnolia.event.SimpleEventBus {environmentId=main}: Exception caught when dispatching info.magnolia.types.ContentTypeChangeEvent with info.magnolia.webhooks.registry.ContentTypeEventHandler eventHandler.
java.lang.NullPointerException: null
at info.magnolia.webhooks.registry.ContentTypeEventHandler.lambda$findWebhookEventDefinitionsForContentType$0(ContentTypeEventHandler.java:68) ~[magnolia-webhooks-core-2.0.0-SNAPSHOT.jar:?]
at java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90) ~[?:?]
at java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1632) ~[?:?]
at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127) ~[?:?]
at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502) ~[?:?]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488) ~[?:?]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) ~[?:?]
at java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230) ~[?:?]
at java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196) ~[?:?]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
at java.util.stream.ReferencePipeline.anyMatch(ReferencePipeline.java:528) ~[?:?]
at info.magnolia.webhooks.registry.ContentTypeEventHandler.lambda$findWebhookEventDefinitionsForContentType$1(ContentTypeEventHandler.java:68) ~[magnolia-webhooks-core-2.0.0-SNAPSHOT.jar:?]
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:176) ~[?:?]
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655) ~[?:?]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) ~[?:?]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) ~[?:?]
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913) ~[?:?]
- is related to
-
MGNLHOOK-267 NullPointerException when empty events
- Open
1.
|
Implementation | Completed | Robert Šiška | |||||||||
2.
|
Review | Completed | Oanh Thai Hoang | |||||||||
3.
|
Pre-Integration QA | Completed | Oanh Thai Hoang |
|
||||||||
4.
|
QA | Completed | Phong Le Quoc |