|
FindBugs™ 1.3.9 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.umd.cs.findbugs.ByteCodePatternDetector
edu.umd.cs.findbugs.detect.BCPMethodReturnCheck
@Deprecated public class BCPMethodReturnCheck
This detector looks for places where the return value of a method is suspiciously ignored. Ignoring the return values from immutable objects such as java.lang.String are a common and easily found type of bug.
Field Summary |
---|
Fields inherited from interface edu.umd.cs.findbugs.Priorities |
---|
EXP_PRIORITY, HIGH_PRIORITY, IGNORE_PRIORITY, LOW_PRIORITY, NORMAL_PRIORITY |
Constructor Summary | |
---|---|
BCPMethodReturnCheck(BugReporter bugReporter)
Deprecated. Constructor. |
Method Summary | |
---|---|
static void |
addMethodWhoseReturnMustBeChecked(java.lang.String className,
java.lang.String methodName,
java.lang.String methodSig,
int mode)
Deprecated. |
static java.lang.String |
extractPackageName(java.lang.String className)
Deprecated. |
protected BugReporter |
getBugReporter()
Deprecated. |
ByteCodePattern |
getPattern()
Deprecated. Get the ByteCodePattern for this detector. |
boolean |
prescreen(org.apache.bcel.classfile.Method method,
ClassContext classContext)
Deprecated. Prescreen a method. |
void |
reportMatch(ClassContext classContext,
org.apache.bcel.classfile.Method method,
ByteCodePatternMatch match)
Deprecated. Called to report an instance of the ByteCodePattern. |
Methods inherited from class edu.umd.cs.findbugs.ByteCodePatternDetector |
---|
report, visitClassContext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BCPMethodReturnCheck(BugReporter bugReporter)
bugReporter
- the BugReporter to report bug instances withMethod Detail |
---|
public ByteCodePattern getPattern()
ByteCodePatternDetector
getPattern
in class ByteCodePatternDetector
public static void addMethodWhoseReturnMustBeChecked(java.lang.String className, java.lang.String methodName, java.lang.String methodSig, int mode)
protected BugReporter getBugReporter()
getBugReporter
in class ByteCodePatternDetector
public boolean prescreen(org.apache.bcel.classfile.Method method, ClassContext classContext)
ByteCodePatternDetector
As a datapoint, prescreening speeds up the BCPDoubleCheck detector by a factor of 5 with no loss of generality and only a dozen or so extra lines of code.
prescreen
in class ByteCodePatternDetector
method
- the methodclassContext
- the ClassContext for the method
public void reportMatch(ClassContext classContext, org.apache.bcel.classfile.Method method, ByteCodePatternMatch match)
ByteCodePatternDetector
reportMatch
in class ByteCodePatternDetector
classContext
- the ClassContext for the analyzed classmethod
- the method to instance appears inmatch
- the ByteCodePatternMatch object representing the match
of the ByteCodePattern against actual instructions in the methodpublic static java.lang.String extractPackageName(java.lang.String className)
|
FindBugs™ 1.3.9 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |