This source file includes following definitions.
- visit
- sawOpcode
package org.chromium.tools.findbugs.plugin;
import edu.umd.cs.findbugs.BugInstance;
import edu.umd.cs.findbugs.BugReporter;
import edu.umd.cs.findbugs.bcel.OpcodeStackDetector;
import org.apache.bcel.classfile.Code;
public class SynchronizedMethodDetector extends OpcodeStackDetector {
private BugReporter mBugReporter;
public SynchronizedMethodDetector(BugReporter bugReporter) {
this.mBugReporter = bugReporter;
}
@Override
public void visit(Code code) {
if (getMethod().isSynchronized()) {
mBugReporter.reportBug(new BugInstance(this, "CHROMIUM_SYNCHRONIZED_METHOD",
NORMAL_PRIORITY)
.addClassAndMethod(this)
.addSourceLine(this));
}
super.visit(code);
}
@Override
public void sawOpcode(int arg0) {
}
}