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
While experimenting with 3.1.0_preview2, I noticed that findbugs/bcel fails to parse the following code during analysis. Note that this problem only occurs in the preview, fb 3.0.1 handles this code just fine. In case you're not interested in bug reports for previews, feel free to just close this issue.
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.Properties;
import java.util.stream.Stream;
public class MyClass {
public static void create(URL url) {
try (InputStream in = url.openStream()) {
Properties p1 = new Properties();
p1.load(in);
} catch (IOException e) {
}
}
public Stream<String> keys() {
return Stream.<Properties>of().flatMap(p -> p.stringPropertyNames().stream());
}
}
Analysing this class e.g. in the findbugs gui results in the following stacktrace:
The following errors occurred during analysis:
Exception analyzing MyClass using detector edu.umd.cs.findbugs.detect.FindUnsatisfiedObligation
org.apache.bcel.classfile.ClassFormatException: Constant pool at index 0 is null.
At org.apache.bcel.classfile.ConstantPool.getConstant(ConstantPool.java:258)
At org.apache.bcel.classfile.ConstantPool.getConstantString(ConstantPool.java:293)
At org.apache.bcel.generic.FieldOrMethod.getReferenceType(FieldOrMethod.java:116)
At edu.umd.cs.findbugs.ba.obl.InstructionActionCache.getActions(InstructionActionCache.java:107)
At edu.umd.cs.findbugs.ba.obl.ObligationAnalysis.transferInstruction(ObligationAnalysis.java:139)
At edu.umd.cs.findbugs.ba.obl.ObligationAnalysis.transferInstruction(ObligationAnalysis.java:68)
At edu.umd.cs.findbugs.ba.AbstractDataflowAnalysis.transfer(AbstractDataflowAnalysis.java:135)
At edu.umd.cs.findbugs.ba.obl.ObligationAnalysis.transfer(ObligationAnalysis.java:160)
At edu.umd.cs.findbugs.ba.obl.ObligationAnalysis.transfer(ObligationAnalysis.java:68)
At edu.umd.cs.findbugs.ba.Dataflow.execute(Dataflow.java:376)
At edu.umd.cs.findbugs.classfile.engine.bcel.ObligationDataflowFactory.analyze(ObligationDataflowFactory.java:75)
At edu.umd.cs.findbugs.classfile.engine.bcel.ObligationDataflowFactory.analyze(ObligationDataflowFactory.java:45)
At edu.umd.cs.findbugs.classfile.impl.AnalysisCache.analyzeMethod(AnalysisCache.java:369)
At edu.umd.cs.findbugs.classfile.impl.AnalysisCache.getMethodAnalysis(AnalysisCache.java:322)
At edu.umd.cs.findbugs.detect.FindUnsatisfiedObligation$MethodChecker.analyzeMethod(FindUnsatisfiedObligation.java:240)
At edu.umd.cs.findbugs.detect.FindUnsatisfiedObligation.visitMethodCFG(FindUnsatisfiedObligation.java:158)
At edu.umd.cs.findbugs.bcel.CFGDetector.visitClass(CFGDetector.java:93)
At edu.umd.cs.findbugs.detect.FindUnsatisfiedObligation.visitClass(FindUnsatisfiedObligation.java:138)
At edu.umd.cs.findbugs.FindBugs2.analyzeApplication(FindBugs2.java:1089)
At edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:283)
At edu.umd.cs.findbugs.gui2.BugLoader.doAnalysis(BugLoader.java:101)
At edu.umd.cs.findbugs.gui2.AnalyzingDialog$AnalysisThread.run(AnalyzingDialog.java:275)
The text was updated successfully, but these errors were encountered:
While experimenting with 3.1.0_preview2, I noticed that findbugs/bcel fails to parse the following code during analysis. Note that this problem only occurs in the preview, fb 3.0.1 handles this code just fine. In case you're not interested in bug reports for previews, feel free to just close this issue.
Analysing this class e.g. in the findbugs gui results in the following stacktrace:
The text was updated successfully, but these errors were encountered: