[Fb-contrib-commit] SF.net SVN: fb-contrib: [469] trunk/fb-contrib
Brought to you by:
dbrosius
From: <dbr...@us...> - 2006-04-18 02:43:31
|
Revision: 469 Author: dbrosius Date: 2006-04-17 19:43:21 -0700 (Mon, 17 Apr 2006) ViewCVS: http://svn.sourceforge.net/fb-contrib/?rev=469&view=rev Log Message: ----------- Manually cleanup memory now that StatelessDetector is removed. Modified Paths: -------------- trunk/fb-contrib/.classpath trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/JDBCVendorReliance.java Modified: trunk/fb-contrib/.classpath =================================================================== --- trunk/fb-contrib/.classpath 2006-04-17 15:52:11 UTC (rev 468) +++ trunk/fb-contrib/.classpath 2006-04-18 02:43:21 UTC (rev 469) @@ -3,8 +3,8 @@ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="src" path="src"/> <classpathentry kind="src" path="samples"/> - <classpathentry kind="lib" path="C:/fb-contrib/fb-contrib/lib/findbugs.jar"/> - <classpathentry kind="lib" path="C:/fb-contrib/fb-contrib/lib/bcel.jar"/> - <classpathentry kind="lib" path="C:/fb-contrib/fb-contrib/samples/lib/jsp-api.jar"/> + <classpathentry kind="lib" path="O:/fb-contrib/fb-contrib/lib/findbugs.jar"/> + <classpathentry kind="lib" path="O:/fb-contrib/fb-contrib/lib/bcel.jar"/> + <classpathentry kind="lib" path="O:/fb-contrib/fb-contrib/samples/lib/jsp-api.jar"/> <classpathentry kind="output" path="classes"/> </classpath> Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/JDBCVendorReliance.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/JDBCVendorReliance.java 2006-04-17 15:52:11 UTC (rev 468) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/JDBCVendorReliance.java 2006-04-18 02:43:21 UTC (rev 469) @@ -31,16 +31,16 @@ import edu.umd.cs.findbugs.BugReporter; import edu.umd.cs.findbugs.BytecodeScanningDetector; import edu.umd.cs.findbugs.OpcodeStack; -import edu.umd.cs.findbugs.StatelessDetector; +import edu.umd.cs.findbugs.ba.ClassContext; /** * looks for uses of jdbc vendor specific classes and methods making the database access code * non portable. */ -public class JDBCVendorReliance extends BytecodeScanningDetector implements StatelessDetector { - +public class JDBCVendorReliance extends BytecodeScanningDetector +{ private BugReporter bugReporter; - private OpcodeStack stack = new OpcodeStack(); + private OpcodeStack stack; private Map<Integer, Integer> jdbcLocals = new HashMap<Integer, Integer>(); /** @@ -51,17 +51,14 @@ this.bugReporter = bugReporter; } + public void visitClassContext(ClassContext classContext) { + stack = new OpcodeStack(); + jdbcLocals = new HashMap<Integer, Integer>(); + super.visitClassContext(classContext); + stack = null; + jdbcLocals = null; + } /** - * clone this detector so that it can be a StatelessDetector - * - * @return a clone of this object - */ - @Override - public Object clone() throws CloneNotSupportedException { - return super.clone(); - } - - /** * implement the visitor to reset the opcode stack and set of locals that are jdbc objects * * @param obj the context param of the currently parsed method This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |