1343
I'm trying to write a Findbugs plugin.
I hit the same issue as #1343.
Exception:
edu.umd.cs.findbugs.ba.DataflowAnalysisException: not enough values on stack: access=0, avail=0 at edu.umd.cs.findbugs.ba.Frame.getStackValue(Frame.java:247) at edu.umd.cs.findbugs.ba.Hierarchy.resolveMethodCallTargets(Hierarchy.java:745) at
Below is the code:
for (Iterator<Location> i = cfg.locationIterator(); i.hasNext();) { Location location = i.next(); Instruction ins = location.getHandle().getInstruction(); if (ins instanceof InvokeInstruction) { Set<JavaClassAndMethod> tmpSet = Hierarchy.resolveMethodCallTargets((InvokeInstruction) ins, classContext.getTypeDataflow(method).getFactAtLocation(location), classContext.getConstantPoolGen());
I want to get all the related Java classes and methodes of a method. Other than using resolveMethodCallTargets is there another way?
Please provide more context. The best would be to have runnable simple plugin and test class which reveals the problem. Current description is too vague to investigate. The code you are writing should work in general.