[Fb-contrib-commit] SF.net SVN: fb-contrib: [466] trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/det
Brought to you by:
dbrosius
From: <dbr...@us...> - 2006-04-17 15:49:39
|
Revision: 466 Author: dbrosius Date: 2006-04-17 08:49:33 -0700 (Mon, 17 Apr 2006) ViewCVS: http://svn.sourceforge.net/fb-contrib/?rev=466&view=rev Log Message: ----------- Manually cleanup memory now that StatelessDetector is removed. Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/FloatingPointLoops.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/FloatingPointLoops.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/FloatingPointLoops.java 2006-04-17 15:47:18 UTC (rev 465) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/FloatingPointLoops.java 2006-04-17 15:49:33 UTC (rev 466) @@ -22,13 +22,12 @@ import java.util.Iterator; import java.util.Set; -import org.apache.bcel.classfile.Method; +import org.apache.bcel.classfile.Code; import org.apache.bcel.generic.Type; import edu.umd.cs.findbugs.BugInstance; import edu.umd.cs.findbugs.BugReporter; import edu.umd.cs.findbugs.BytecodeScanningDetector; -import edu.umd.cs.findbugs.StatelessDetector; /** * looks for methods that use floating point indexes for loops. Since floating point @@ -36,7 +35,7 @@ * hard to find problems. It is usually better to use integer indexing, and calculating * the correct floating point value from the index. */ -public class FloatingPointLoops extends BytecodeScanningDetector implements StatelessDetector +public class FloatingPointLoops extends BytecodeScanningDetector { private static final int SEEN_LOAD = 1; private static final int SEEN_CMPX = 2; @@ -67,11 +66,13 @@ /** * implements the visitor to clear the forLoops set * - * @param obj the context object for the currently parsed method + * @param obj the context object for the currently parsed code block */ @Override - public void visitMethod(Method obj) { - forLoops.clear(); + public void visitCode(Code obj) { + forLoops = new HashSet<FloatForLoop>(); + super.visitCode(obj); + forLoops = null; } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |