Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spotbugs errors after updating SpotBugs Gradle Plugin 5.1.4 -> 5.1.5 #2629

Closed
xzel23 opened this issue Oct 13, 2023 · 2 comments · Fixed by #2630
Closed

Spotbugs errors after updating SpotBugs Gradle Plugin 5.1.4 -> 5.1.5 #2629

xzel23 opened this issue Oct 13, 2023 · 2 comments · Fixed by #2630

Comments

@xzel23
Copy link

xzel23 commented Oct 13, 2023

After upgrading to 5.1.5 I get the following error when running spotbugs:

> Task :utility:spotbugsMain
The following errors occurred during analysis:
  Exception analyzing com.dua3.utility.io.FileSystemView$Flags using detector edu.umd.cs.findbugs.detect.FindAssertionsWithSideEffects
    java.lang.NullPointerException: Cannot invoke "edu.umd.cs.findbugs.ba.XMethod.getSignature()" because the return value of "edu.umd.cs.findbugs.detect.FindAssertionsWithSideEffects.getXMethodOperand()" is null
      At edu.umd.cs.findbugs.detect.FindAssertionsWithSideEffects.detect(FindAssertionsWithSideEffects.java:65)
      At edu.umd.cs.findbugs.detect.AbstractAssertDetector.sawOpcode(AbstractAssertDetector.java:52)
      At edu.umd.cs.findbugs.visitclass.DismantleBytecode.visit(DismantleBytecode.java:878)
      At edu.umd.cs.findbugs.visitclass.BetterVisitor.visitCode(BetterVisitor.java:218)
      At edu.umd.cs.findbugs.visitclass.PreorderVisitor.visitCode(PreorderVisitor.java:250)
      At edu.umd.cs.findbugs.bcel.OpcodeStackDetector.visitCode(OpcodeStackDetector.java:65)
      At org.apache.bcel.classfile.Code.accept(Code.java:121)
      At edu.umd.cs.findbugs.visitclass.PreorderVisitor.doVisitMethod(PreorderVisitor.java:322)
      At edu.umd.cs.findbugs.visitclass.PreorderVisitor.visitJavaClass(PreorderVisitor.java:404)
      At org.apache.bcel.classfile.JavaClass.accept(JavaClass.java:244)
      At edu.umd.cs.findbugs.BytecodeScanningDetector.visitClassContext(BytecodeScanningDetector.java:38)
      At edu.umd.cs.findbugs.DetectorToDetector2Adapter.visitClass(DetectorToDetector2Adapter.java:76)
      At edu.umd.cs.findbugs.FindBugs2.lambda$analyzeApplication$1(FindBugs2.java:1108)
      At java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
      At edu.umd.cs.findbugs.CurrentThreadExecutorService.execute(CurrentThreadExecutorService.java:86)
      At java.base/java.util.concurrent.AbstractExecutorService.invokeAll(AbstractExecutorService.java:247)
      At edu.umd.cs.findbugs.FindBugs2.analyzeApplication(FindBugs2.java:1118)
      At edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:309)
      At edu.umd.cs.findbugs.FindBugs.runMain(FindBugs.java:395)
      At edu.umd.cs.findbugs.FindBugs2.main(FindBugs2.java:1231)

This is fixed when downgrading to 5.1.4. It also works when I use 6.0.0-beta.4.

PS: I am on JDK 21, ARM64 (OpenJDK 64-Bit Server VM Zulu21.28+85-CA (build 21+35, mixed mode, sharing).

@KengoTODA
Copy link
Member

Thanks, it should be problem on the spotbugs-core v4.8.0, because the 5.1.5 release has no implementation change on this plugin.

spotbugs/spotbugs-gradle-plugin@5.1.4...5.1.5

@KengoTODA KengoTODA transferred this issue from spotbugs/spotbugs-gradle-plugin Oct 13, 2023
@hazendaz
Copy link
Member

If possible, just use 5.1.4 for now. This is fixed in spotbugs but there seem to be a few other issues being seen that are yet to be addressed. Rather that churn releases, we need probably the week to review the current issues and try to solve them as well. I anticipate probably next weekend we cut this all again. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants