[Fb-contrib-commit] SF.net SVN: fb-contrib: [558] trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/de
Brought to you by:
dbrosius
From: <dbr...@us...> - 2006-06-06 21:00:40
|
Revision: 558 Author: dbrosius Date: 2006-06-06 13:30:34 -0700 (Tue, 06 Jun 2006) ViewCVS: http://svn.sourceforge.net/fb-contrib/?rev=558&view=rev Log Message: ----------- reset branchTargets on method entry, and enter catch block targets into branchTargets 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-06-06 16:08:04 UTC (rev 557) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/RedundantMethodCalls.java 2006-06-06 20:30:34 UTC (rev 558) @@ -26,6 +26,7 @@ import java.util.Set; import org.apache.bcel.classfile.Code; +import org.apache.bcel.classfile.CodeException; import org.apache.bcel.generic.Type; import com.mebigfatguy.fbcontrib.utils.Integer14; @@ -97,6 +98,11 @@ stack.resetForMethodEntry(this); localMethodCalls.clear(); fieldMethodCalls.clear(); + branchTargets.clear(); + CodeException[] codeExceptions = obj.getExceptionTable(); + for (CodeException codeEx : codeExceptions) { + branchTargets.add(codeEx.getHandlerPC()); + } super.visitCode(obj); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |