@Override public boolean isResourceClose(BasicBlock basicBlock, InstructionHandle handle, ConstantPoolGen cpg, Lock resource, ResourceValueFrame frame) throws DataflowAnalysisException { if (!mightCloseResource(basicBlock, handle, cpg)) { return false; } ResourceValue topValue = frame.getTopValue(); return topValue.isInstance(); }
public boolean isStreamOpen(BasicBlock basicBlock, InstructionHandle handle, ConstantPoolGen cpg, ResourceValueFrame frame) { if (isOpenOnCreation) { return false; } Instruction ins = handle.getInstruction(); if (!(ins instanceof INVOKESPECIAL)) { return false; } // Does this instruction open the stream? INVOKESPECIAL inv = (INVOKESPECIAL) ins; return frame.isValid() && getInstanceValue(frame, inv, cpg).isInstance() && matchMethod(inv, cpg, this.getResourceClass(), Const.CONSTRUCTOR_NAME); }
if (!frame.isValid() || !getInstanceValue(frame, inv, cpg).isInstance()) { return false;
ResourceValue topValue = frameAtIf.getValue(frameAtIf.getNumSlots() - 1); if (topValue.isInstance()) { if ((isNullCheck && edgeType == IFCMP_EDGE) || (isNonNullCheck && edgeType == FALL_THROUGH_EDGE)) {
@Override public boolean isResourceClose(BasicBlock basicBlock, InstructionHandle handle, ConstantPoolGen cpg, Lock resource, ResourceValueFrame frame) throws DataflowAnalysisException { if (!mightCloseResource(basicBlock, handle, cpg)) { return false; } ResourceValue topValue = frame.getTopValue(); return topValue.isInstance(); }
public boolean isStreamOpen(BasicBlock basicBlock, InstructionHandle handle, ConstantPoolGen cpg, ResourceValueFrame frame) { if (isOpenOnCreation) { return false; } Instruction ins = handle.getInstruction(); if (!(ins instanceof INVOKESPECIAL)) { return false; } // Does this instruction open the stream? INVOKESPECIAL inv = (INVOKESPECIAL) ins; return frame.isValid() && getInstanceValue(frame, inv, cpg).isInstance() && matchMethod(inv, cpg, this.getResourceClass(), "<init>"); }
if (!frame.isValid() || !getInstanceValue(frame, inv, cpg).isInstance()) { return false;
ResourceValue topValue = frameAtIf.getValue(frameAtIf.getNumSlots() - 1); if (topValue.isInstance()) { if ((isNullCheck && edgeType == IFCMP_EDGE) || (isNonNullCheck && edgeType == FALL_THROUGH_EDGE)) {