mebigfatguy / fb-contrib

a FindBugs/SpotBugs plugin for doing static code analysis for java code bases
http://fb-contrib.sf.net
GNU Lesser General Public License v2.1
157 stars 45 forks source link

NullPointerException #449

Closed PowerStat closed 1 year ago

PowerStat commented 1 year ago

Hello, I am using maven with the following plugins and java 11/17

spotbugs 4.7.3.6 sbcontrib 7.6.0 findsecbugs 1.12.0

when I got the following:

 [java] The following errors occurred during analysis:
 [java]   Exception analyzing de.powerstat.validation.entities.Person using detector com.mebigfatguy.fbcontrib.detect.OptionalIssues
 [java]     java.lang.NullPointerException: Cannot invoke "edu.umd.cs.findbugs.ba.XMethod.getClassName()" because "m" is null
 [java]       At com.mebigfatguy.fbcontrib.detect.OptionalIssues.sawOpcode(OptionalIssues.java:226)
 [java]       At edu.umd.cs.findbugs.visitclass.DismantleBytecode.visit(DismantleBytecode.java:878)
 [java]       At edu.umd.cs.findbugs.visitclass.BetterVisitor.visitCode(BetterVisitor.java:218)
 [java]       At edu.umd.cs.findbugs.visitclass.PreorderVisitor.visitCode(PreorderVisitor.java:243)
 [java]       At com.mebigfatguy.fbcontrib.detect.OptionalIssues.visitCode(OptionalIssues.java:158)
 [java]       At org.apache.bcel.classfile.Code.accept(Code.java:121)
 [java]       At edu.umd.cs.findbugs.visitclass.PreorderVisitor.doVisitMethod(PreorderVisitor.java:315)
 [java]       At edu.umd.cs.findbugs.visitclass.PreorderVisitor.visitJavaClass(PreorderVisitor.java:397)
 [java]       At org.apache.bcel.classfile.JavaClass.accept(JavaClass.java:244)
 [java]       At edu.umd.cs.findbugs.BytecodeScanningDetector.visitClassContext(BytecodeScanningDetector.java:38)
 [java]       At com.mebigfatguy.fbcontrib.detect.OptionalIssues.visitClassContext(OptionalIssues.java:140)
 [java]       At edu.umd.cs.findbugs.DetectorToDetector2Adapter.visitClass(DetectorToDetector2Adapter.java:76)
 [java]       At edu.umd.cs.findbugs.FindBugs2.lambda$analyzeApplication$1(FindBugs2.java:1108)
 [java]       At java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
 [java]       At edu.umd.cs.findbugs.CurrentThreadExecutorService.execute(CurrentThreadExecutorService.java:86)
 [java]       At java.base/java.util.concurrent.AbstractExecutorService.invokeAll(AbstractExecutorService.java:247)
 [java]       At edu.umd.cs.findbugs.FindBugs2.analyzeApplication(FindBugs2.java:1118)
 [java]       At edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:309)
 [java]       At edu.umd.cs.findbugs.FindBugs.runMain(FindBugs.java:395)
 [java]       At edu.umd.cs.findbugs.FindBugs2.main(FindBugs2.java:1231)
 [java] The following classes needed for analysis were missing:
 [java]   makeConcatWithConstants
 [java]   execute
 [java]   apply

Never seen that in the past. Maybe it's a bug?

mebigfatguy commented 1 year ago

targetted for 7.6.1