-
Type: Improvement
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 10.10-HF44, 11.5, 2021.2
-
Component/s: Events / Works
-
Tags:
-
Team:PLATFORM
-
Sprint:nxplatform #31
-
Story Points:2
It is possible to get this kind of error, probably because of the JVM optimization on frequent NPE in this case we may catch multiple times the same exception object resulting in "Self-suppression not permitted" exception:
java.lang.IllegalArgumentException: Self-suppression not permitted at java.lang.Throwable.addSuppressed(Throwable.java:1072) ~[?:1.8.0_282] at org.nuxeo.ecm.core.work.AbstractWork.run(AbstractWork.java:390) ~[nuxeo-core-event-10.10-HF39.jar:?] at org.nuxeo.ecm.core.work.WorkHolder.run(WorkHolder.java:57) ~[nuxeo-core-event-10.10-HF39.jar:?] at org.nuxeo.ecm.core.work.WorkComputation.processRecord(WorkComputation.java:104) ~[nuxeo-core-event-10.10-HF39.jar:?] at org.nuxeo.lib.stream.computation.log.ComputationRunner.lambda$processRecordWithRetry$10(ComputationRunner.java:375) ~[nuxeo-stream-10.10-HF41.jar:?] at net.jodah.failsafe.Functions$10.call(Functions.java:252) [failsafe-1.1.0.jar:1.1.0] at net.jodah.failsafe.SyncFailsafe.call(SyncFailsafe.java:145) [failsafe-1.1.0.jar:1.1.0] at net.jodah.failsafe.SyncFailsafe.run(SyncFailsafe.java:81) [failsafe-1.1.0.jar:1.1.0] at org.nuxeo.lib.stream.computation.log.ComputationRunner.processRecordWithRetry(ComputationRunner.java:375) [nuxeo-stream-10.10-HF41.jar:? ... Caused by: java.lang.NullPointerException
We should check that suppressed != e before calling suppressed.addSuppressed(e);
- Is referenced in
(2 Is referenced in)