javafindbugsbcel

finbugs Error constructing methodGen


I have very strange issue with findbugs:

Error constructing methodGen
org.apache.bcel.classfile.ClassFormatException: Invalid method signature: !+Lsome/packag/and/SomeClass
    org.apache.bcel.classfile.Utility.typeOfSignature(Utility.java:1012)
    org.apache.bcel.generic.Type.getType(Type.java:181)
    org.apache.bcel.generic.MethodGen.<init>(MethodGen.java:258)         edu.umd.cs.findbugs.classfile.engine.bcel.MethodGenFactory.analyze(MethodGenFactory.java:90)
    edu.umd.cs.findbugs.classfile.engine.bcel.MethodGenFactory.analyze(MethodGenFactory.java:41)
    edu.umd.cs.findbugs.classfile.impl.AnalysisCache.analyzeMethod(AnalysisCache.java:369)
    edu.umd.cs.findbugs.classfile.impl.AnalysisCache.getMethodAnalysis(AnalysisCache.java:322)
    edu.umd.cs.findbugs.ba.ClassContext.getMethodAnalysis(ClassContext.java:1002)
    edu.umd.cs.findbugs.ba.ClassContext.getMethodAnalysisNoException(ClassContext.java:976)
    edu.umd.cs.findbugs.ba.ClassContext.getMethodGen(ClassContext.java:287)
    edu.umd.cs.findbugs.detect.FindUseOfNonSerializableValue.analyzeMethod(FindUseOfNonSerializableValue.java:126)
    edu.umd.cs.findbugs.detect.FindUseOfNonSerializableValue.visitClassContext(FindUseOfNonSerializableValue.java:94)
    edu.umd.cs.findbugs.DetectorToDetector2Adapter.visitClass(DetectorToDetector2Adapter.java:76)
    edu.umd.cs.findbugs.FindBugs2.analyzeApplication(FindBugs2.java:1089)
    edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:283)
    edu.umd.cs.findbugs.FindBugs.runMain(FindBugs.java:402)
    edu.umd.cs.findbugs.FindBugs2.main(FindBugs2.java:1200)

This exception is getting from CI server and if I run findbugs localy, but if I run findBugs from Idea - everything is fine.

I found this bugreport, but on current project we use javac copiler and new code doesn't have any lambda stuff.


Solution

  • But there could be still compiler version (jdk version) issue. Are there any difference in JDK versions on the CI and you local PC? You can try to reproduce the issue adding another one JDK at your local PC and running findbugs.