I'm using a class that extends BytecodeScanningDetector to check for some problematic fields in a class.
After detecting whether the field is problematic, I add it to the bug report like below:
Once I run findbugs, it identifies the bug, lists it in the left pane, but does not highlight the corresponding source line.
Any hints/help on this will be very appreciated.
public void visit(Field f) {
if (isProblematic(getXField())) {
bugReporter.reportBug(new BugInstance(this,
tBugType,
HIGH_PRIORITY)
.addClass(currentClass) //from visit(JavaClass)
.addField(this));
}
}
public void visit(JavaClass someObj) {
currentClass = someObj.getClassName();
}
P.S. I tried posting this on the findbugs list but... no joy.