Hi,
I’m currently struggling with an exception in core that is caused by the following code [1] in my plugin. I am setting the result of a pipeline step if the quality gate fails:
flowNode.addOrReplaceAction(new WarningAction(result).withMessage(message));
This call sometimes fails in core with:
java.lang.UnsupportedOperationException
at java.util.concurrent.CopyOnWriteArrayList$COWIterator.remove(CopyOnWriteArrayList.java:1182)
at java.util.AbstractCollection.removeAll(AbstractCollection.java:376)
at hudson.model.Actionable.addOrReplaceAction(Actionable.java:209)
at io.jenkins.plugins.analysis.core.util.PipelineResultHandler.setResult(PipelineResultHandler.java:34)
Is this a bug in core or am I using the API in a not supported way? (This exception rarely occurs, however, at least 2 different people reported that problem recently[2]). The affected code is in core for quite some years now so I wonder why nobody has been hit by that problem before.