java.lang.UnsupportedOperationException in RecordIssuesStep

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major
    • Environment:
    • workflow-api 2.41

      While recording ideaInspection, we get the following exception:

      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)
      	at io.jenkins.plugins.analysis.core.steps.IssuesPublisher.attachAction(IssuesPublisher.java:120)
      	at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.publishResult(IssuesRecorder.java:721)
      	at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.record(IssuesRecorder.java:651)
      	at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.perform(IssuesRecorder.java:617)
      	at io.jenkins.plugins.analysis.core.steps.RecordIssuesStep$Execution.run(RecordIssuesStep.java:1024)
      	at io.jenkins.plugins.analysis.core.steps.RecordIssuesStep$Execution.run(RecordIssuesStep.java:985)
      	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      

      The pipeline code:

      recordIssues(
      	failOnError: true,
      	enabledForFailure: true,
      	ignoreFailedBuilds: false,
      	qualityGates: [[threshold: 1, type: 'TOTAL', unstable: true]],
      	tools: [
      		ideaInspection(pattern: 'idea-inspection-output/**'),
      	],
      )
      

      This is identical in all projects. It is not related to the specific inspection result itself, as long as a failing inspection is reported. Projects without inspection errors will be a success.

      Please find attached a minimal example. Disabling failOnError will make the sample running. The only errors I see in my logs are:

      [IntelliJ IDEA Inspections] [-ERROR-] Can't create fingerprints for some files:
      [IntelliJ IDEA Inspections] [-ERROR-] - '$PROJECT_DIR$/testsrc/com/example/ExampleTest.java', IO exception has been thrown: java.nio.file.NoSuchFileException: $PROJECT_DIR$/testsrc/com/example/ExampleTest.java
      

      I'm not sure if this is related to the exception, but even if this is handled as an error in the sense of failOnError, there should be no exception.

            Assignee:
            Bill Collins
            Reporter:
            Martin Heinzerling
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: