-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
BFA plugin version: 2.2.0
Jenkins version: CloudBees Jenkins Enterprise 2.319.1.5-rolling
After adding a global fallback category with the name "fallback" on the Jenkins /configure page, we began seeing exceptions when scanning build logs:
2022-03-09 14:03:41.658+0000 [id=4345] SEVERE c.s.j.p.bfa.BuildFailureScanner#scan: Could not scan build <BitBucketProject>/<Repository>/<Branch> #1 java.lang.NullPointerException at java.base/java.util.Collections.disjoint(Collections.java:5404) at com.sonyericsson.jenkins.plugins.bfa.BuildFailureScanner.scan(BuildFailureScanner.java:212) at com.sonyericsson.jenkins.plugins.bfa.BuildFailureScanner.scanIfNotScanned(BuildFailureScanner.java:165) at com.sonyericsson.jenkins.plugins.bfa.sod.ScanOnDemandTask.scanBuild(ScanOnDemandTask.java:116) at com.sonyericsson.jenkins.plugins.bfa.sod.ScanOnDemandTask.run(ScanOnDemandTask.java:78) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) 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:834)
Because of this exception, the "Identified Problems" section was not displayed on these builds.
This exception occurs when the failure scan previously (before adding a fallback category) would have matched a single failure cause, and that failure cause contained zero categories.
We were able to stop the exceptions by removing the fallback category. After adding back the fallback category, we were also able to stop the exceptions by adding a category to every failure cause that contained zero categories. So it appears that the plugin is expecting every cause to contain at least one category, but that isn't necessarily true.