Skip to content

NullPointerException in FieldItemSummary  #2759

Closed
@romani

Description

detected during version bump spotbugs-maven-plugin from 4.7.3.5 to 4.8.2.0
checkstyle/checkstyle#14117

https://app.circleci.com/pipelines/github/checkstyle/checkstyle/22221/workflows/e397e60b-04ca-4618-b94e-5ca0be2a20d8/jobs/446175

OS:

 Kernel Version: 5.15.0-1039-aws
 Operating System: Ubuntu 20.04.6 LTS
 OSType: linux
 Architecture: x86_64

Special docker container:

Starting container checkstyle/jdk-11-groovy-git-mvn:11.0.20.1__2.4.21__2.42.0__3.9.5
this means
jdk11.0.20.1
mvn 3.9.5

Execution log:

.....
[�[1;34mINFO�[m] �[1m--- �[0;32mspotbugs:4.8.2.0:spotbugs�[m �[1m(spotbugs)�[m @ �[36mcheckstyle�[0;1m ---�[m
[�[1;34mINFO�[m] Fork Value is true
     [java] The following errors occurred during analysis:
     [java]   Exception analyzing com.puppycrawl.tools.checkstyle.grammar.java.JavaLanguageParser$ClassBlockContext using detector edu.umd.cs.findbugs.detect.FieldItemSummary
     [java]     java.lang.NullPointerException
     [java]       At edu.umd.cs.findbugs.visitclass.DismantleBytecode.visit(DismantleBytecode.java:719)
     [java]       At edu.umd.cs.findbugs.detect.FieldItemSummary.visit(FieldItemSummary.java:131)
     [java]       At edu.umd.cs.findbugs.visitclass.BetterVisitor.visitCode(BetterVisitor.java:218)
     [java]       At edu.umd.cs.findbugs.visitclass.PreorderVisitor.visitCode(PreorderVisitor.java:250)
     [java]       At edu.umd.cs.findbugs.bcel.OpcodeStackDetector.visitCode(OpcodeStackDetector.java:65)
     [java]       At org.apache.bcel.classfile.Code.accept(Code.java:121)
     [java]       At edu.umd.cs.findbugs.visitclass.PreorderVisitor.doVisitMethod(PreorderVisitor.java:322)
     [java]       At edu.umd.cs.findbugs.visitclass.PreorderVisitor.visitJavaClass(PreorderVisitor.java:404)
     [java]       At org.apache.bcel.classfile.JavaClass.accept(JavaClass.java:244)
     [java]       At edu.umd.cs.findbugs.BytecodeScanningDetector.visitClassContext(BytecodeScanningDetector.java:38)
     [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:242)
     [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)

Note:
on versions below it works wihtou exception (my local):

$ mvn --version
Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537)
Maven home: /opt/maven/apache-maven-3.8.4
Java version: 11.0.14.1, vendor: Amazon.com Inc., runtime: /opt/jvm/amazon-corretto-11.0.14.10.1-linux-x64
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.4.0-210-generic", arch: "amd64", family: "unix"

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions