You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exception analyzing com.acme.common.utils.AnvilUtil
using detector edu.umd.cs.findbugs.detect.MultipleInstantiationsOfSingletons
java.lang.NullPointerException: Cannot invoke "edu.umd.cs.findbugs.ba.XMethod.getClassName()" because "xmethod" is null
At edu.umd.cs.findbugs.MethodAnnotation.fromXMethod(MethodAnnotation.java:264)
At edu.umd.cs.findbugs.BugInstance.addMethod(BugInstance.java:1511)
At edu.umd.cs.findbugs.detect.MultipleInstantiationsOfSingletons.visitAfter(MultipleInstantiationsOfSingletons.java:254)
At edu.umd.cs.findbugs.visitclass.PreorderVisitor.visitJavaClass(PreorderVisitor.java:409)
This might be the same issue as #3669
I suppose you cannot share the class triggering the error but is there something unusual about the method signatures in that class?
Can you please check, does this also happen with SpotBugs 4.9.3? Are there other NPEs with other detectors as well?
If it does not happen with the earlier version, there might be something bigger behind the scenes and the null check would not solve the problem, just hide it.
Activity
gtoison commentedon Sep 22, 2025
This might be the same issue as #3669
I suppose you cannot share the class triggering the error but is there something unusual about the method signatures in that class?
mebigfatguy commentedon Sep 22, 2025
right... Incredibly bog standard class
Implements cloneable, has a static inner class... But wrt method signatures, doesn't even use generics anywhere.
Actually now that i look at it, it declares being Cloneable but relies on Object for implementation.
mebigfatguy commentedon Sep 23, 2025
Yeah it's coming from here
that cloneMethod is null
JuditKnoll commentedon Sep 23, 2025
Can you please check, does this also happen with SpotBugs 4.9.3? Are there other NPEs with other detectors as well?
If it does not happen with the earlier version, there might be something bigger behind the scenes and the null check would not solve the problem, just hide it.
mebigfatguy commentedon Sep 23, 2025
Happens in 4.9.3 as well.
[SPARK-54678] Upgrade `spotbugs-tool` to 4.9.8 and `spotbugs-plugin` …