use of edu.umd.cs.findbugs.OpcodeStack in project fb-contrib by mebigfatguy.
the class AnnotationIssues method visitClassContext.
@Override
public void visitClassContext(ClassContext classContext) {
try {
JavaClass cls = classContext.getJavaClass();
if (cls.getMajor() >= Const.MAJOR_1_5) {
if (isCollecting() || !cls.isAnonymous()) {
stack = new OpcodeStack();
assumedNullTill = new HashMap<>();
assumedNonNullTill = new HashMap<>();
noAssumptionsPossible = new HashSet<>();
super.visitClassContext(classContext);
}
}
} finally {
stack = null;
assumedNullTill = null;
assumedNonNullTill = null;
noAssumptionsPossible = null;
}
}
use of edu.umd.cs.findbugs.OpcodeStack in project fb-contrib by mebigfatguy.
the class ArrayBasedCollections method visitClassContext.
/**
* implement the visitor to report bugs if no Tree comparators were found
*
* @param classContext
* the context object for the class currently being parsed
*/
@Override
public void visitClassContext(ClassContext classContext) {
try {
stack = new OpcodeStack();
mapBugs = new ArrayList<>();
setBugs = new ArrayList<>();
hasMapComparator = false;
hasSetComparator = false;
super.visitClassContext(classContext);
if (!hasMapComparator) {
for (BugInstance bi : mapBugs) {
bugReporter.reportBug(bi);
}
}
if (!hasSetComparator) {
for (BugInstance bi : setBugs) {
bugReporter.reportBug(bi);
}
}
} finally {
stack = null;
mapBugs = null;
setBugs = null;
}
}
use of edu.umd.cs.findbugs.OpcodeStack in project fb-contrib by mebigfatguy.
the class ArrayWrappedCallByReference method visitClassContext.
/**
* implement the visitor to create and clear the stack and wrappers
*
* @param classContext
* the context object of the currently parsed class
*/
@Override
public void visitClassContext(ClassContext classContext) {
try {
stack = new OpcodeStack();
wrappers = new HashMap<>(10);
super.visitClassContext(classContext);
} finally {
stack = null;
wrappers = null;
}
}
use of edu.umd.cs.findbugs.OpcodeStack in project fb-contrib by mebigfatguy.
the class BogusExceptionDeclaration method visitClassContext.
/**
* overrides the visitor to create the opcode stack
*
* @param classContext
* the context object of the currently parsed class
*/
@Override
public void visitClassContext(ClassContext classContext) {
try {
if ((runtimeExceptionClass != null) && (exceptionClass != null)) {
stack = new OpcodeStack();
declaredCheckedExceptions = new HashSet<>(6);
JavaClass cls = classContext.getJavaClass();
classIsFinal = cls.isFinal();
classIsAnonymous = cls.isAnonymous();
super.visitClassContext(classContext);
}
} finally {
declaredCheckedExceptions = null;
stack = null;
}
}
use of edu.umd.cs.findbugs.OpcodeStack in project fb-contrib by mebigfatguy.
the class BuryingLogic method visitClassContext.
/**
* implements the visitor to reset the opcode stack, and initialize if tracking collections
*
* @param classContext
* the currently parsed java class
*/
@Override
public void visitClassContext(ClassContext classContext) {
try {
stack = new OpcodeStack();
ifBlocks = new IfBlocks();
gotoBranchPCs = new BitSet();
casePositions = new BitSet();
super.visitClassContext(classContext);
} finally {
stack = null;
ifBlocks = null;
catchPCs = null;
gotoBranchPCs = null;
casePositions = null;
}
}
Aggregations