use of edu.umd.cs.findbugs.OpcodeStack in project fb-contrib by mebigfatguy.
the class UnsynchronizedSingletonFieldWrites method visitClassContext.
/**
* implements the visitor to look for classes that are singletons
*
* @param classContext
* the context object of the currently parsed class
*/
@Override
public void visitClassContext(ClassContext classContext) {
try {
JavaClass cls = classContext.getJavaClass();
if (isSingleton(cls)) {
syncBlockBranchResetValues = new HashMap<>();
stack = new OpcodeStack();
super.visitClassContext(classContext);
}
} finally {
syncBlockBranchResetValues = null;
stack = null;
}
}
use of edu.umd.cs.findbugs.OpcodeStack in project fb-contrib by mebigfatguy.
the class UnusedParameter method visitClassContext.
/**
* implements the visitor to create parm bitset
*
* @param classContext
* the context object of the currently parsed class
*/
@Override
public void visitClassContext(ClassContext classContext) {
try {
unusedParms = new BitSet();
regToParm = new HashMap<>();
stack = new OpcodeStack();
super.visitClassContext(classContext);
} finally {
stack = null;
regToParm = null;
unusedParms.clear();
}
}
use of edu.umd.cs.findbugs.OpcodeStack in project fb-contrib by mebigfatguy.
the class UseCharacterParameterizedMethod method visitClassContext.
/**
* overrides the visitor to create and clear the opcode stack
*
* @param context
* the context object for the currently parsed class
*/
@Override
public void visitClassContext(final ClassContext context) {
try {
stack = new OpcodeStack();
super.visitClassContext(context);
} finally {
stack = null;
}
}
use of edu.umd.cs.findbugs.OpcodeStack in project fb-contrib by mebigfatguy.
the class UseEnumCollections method visitClassContext.
/**
* implements the visitor to check that the class is greater or equal than 1.5, and set and clear the stack
*
* @param classContext
* the context object for the currently parsed class
*/
@Override
public void visitClassContext(ClassContext classContext) {
try {
JavaClass cls = classContext.getJavaClass();
if (cls.getMajor() >= Const.MAJOR_1_5) {
stack = new OpcodeStack();
checkedFields = new HashSet<>();
enumRegs = new HashMap<>();
enumFields = new HashMap<>();
super.visitClassContext(classContext);
}
} finally {
stack = null;
checkedFields = null;
enumRegs = null;
enumFields = null;
}
}
use of edu.umd.cs.findbugs.OpcodeStack in project fb-contrib by mebigfatguy.
the class WeakExceptionMessaging method visitClassContext.
/**
* overrides the visitor to initialize and tear down the opcode stack
*
* @param classContext
* the context object of the currently parsed class
*/
@Override
public void visitClassContext(ClassContext classContext) {
try {
if (exceptionClass != null) {
stack = new OpcodeStack();
super.visitClassContext(classContext);
}
} finally {
stack = null;
}
}
Aggregations