use of edu.umd.cs.findbugs.OpcodeStack in project fb-contrib by mebigfatguy.
the class UseSplit method visitClassContext.
/**
* implements the visitor to make sure the class is at least java 1.4 and to reset the opcode stack
*/
@Override
public void visitClassContext(ClassContext classContext) {
try {
JavaClass cls = classContext.getJavaClass();
if (cls.getMajor() >= Const.MAJOR_1_4) {
stack = new OpcodeStack();
regValueType = new HashMap<Integer, State>();
super.visitClassContext(classContext);
}
} finally {
stack = null;
regValueType = null;
}
}
use of edu.umd.cs.findbugs.OpcodeStack in project fb-contrib by mebigfatguy.
the class SuspiciousWaitOnConcurrentObject method visitClassContext.
/**
* implements the visitor to check for class file version 1.5 or better
*
* @param classContext
* the context object of the currently parsed class
*/
@Override
public void visitClassContext(ClassContext classContext) {
try {
JavaClass cls = classContext.getJavaClass();
int major = cls.getMajor();
if (major >= Const.MAJOR_1_5) {
stack = new OpcodeStack();
super.visitClassContext(classContext);
}
} finally {
stack = null;
}
}
use of edu.umd.cs.findbugs.OpcodeStack in project fb-contrib by mebigfatguy.
the class UnitTestAssertionOddities method visitClassContext.
/**
* override the visitor to see if this class could be a test class
*
* @param classContext
* the context object of the currently parsed class
*/
@Override
public void visitClassContext(ClassContext classContext) {
try {
JavaClass cls = classContext.getJavaClass();
className = cls.getClassName().replace('.', '/');
isTestCaseDerived = (testCaseClass != null) && cls.instanceOf(testCaseClass);
isAnnotationCapable = (cls.getMajor() >= 5) && ((testAnnotationClass != null) || (testNGAnnotationClass != null));
if (isTestCaseDerived || isAnnotationCapable) {
stack = new OpcodeStack();
fieldsWithAnnotations = new HashSet<>();
super.visitClassContext(classContext);
}
} catch (ClassNotFoundException cnfe) {
bugReporter.reportMissingClass(cnfe);
} finally {
stack = null;
fieldsWithAnnotations = null;
}
}
use of edu.umd.cs.findbugs.OpcodeStack in project fb-contrib by mebigfatguy.
the class UnnecessaryApiConversion method visitClassContext.
@Override
public void visitClassContext(ClassContext classContext) {
try {
stack = new OpcodeStack();
super.visitClassContext(classContext);
} finally {
stack = null;
}
}
use of edu.umd.cs.findbugs.OpcodeStack in project fb-contrib by mebigfatguy.
the class UnnecessaryNewNullCheck method visitClassContext.
@Override
public void visitClassContext(ClassContext classContext) {
try {
stack = new OpcodeStack();
allocationRegs = new BitSet();
transitionPoints = new BitSet();
super.visitClassContext(classContext);
} finally {
stack = null;
allocationRegs = null;
transitionPoints = null;
}
}
Aggregations