[Fb-contrib-commit] SF.net SVN: fb-contrib: [582] trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/de
Brought to you by:
dbrosius
From: <dbr...@us...> - 2006-08-04 06:37:53
|
Revision: 582 Author: dbrosius Date: 2006-08-03 23:37:49 -0700 (Thu, 03 Aug 2006) ViewCVS: http://svn.sourceforge.net/fb-contrib/?rev=582&view=rev Log Message: ----------- RMC uses the getter statistics to report gettors at a low priority Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/RedundantMethodCalls.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/RedundantMethodCalls.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/RedundantMethodCalls.java 2006-08-04 06:28:08 UTC (rev 581) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/RedundantMethodCalls.java 2006-08-04 06:37:49 UTC (rev 582) @@ -29,6 +29,7 @@ import org.apache.bcel.classfile.CodeException; import org.apache.bcel.generic.Type; +import com.mebigfatguy.fbcontrib.collect.Statistics; import com.mebigfatguy.fbcontrib.utils.Integer14; import com.mebigfatguy.fbcontrib.utils.RegisterUtils; @@ -172,7 +173,8 @@ if (!signature.endsWith("V") && methodName.equals(mc.getName()) && signature.equals(mc.getSignature()) && !isRiskyName(methodName)) { Object[] parms = mc.getParms(); if (Arrays.equals(parms, parmConstants)) { - bugReporter.reportBug(new BugInstance(this, "RMC_REDUNDANT_METHOD_CALLS", NORMAL_PRIORITY) + Statistics statistics = Statistics.getStatistics(); + bugReporter.reportBug(new BugInstance(this, "RMC_REDUNDANT_METHOD_CALLS", statistics.isSimpleGetter(methodName, signature) ? LOW_PRIORITY : NORMAL_PRIORITY) .addClass(this) .addMethod(this) .addSourceLine(this) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |