[Fb-contrib-commit] SF.net SVN: fb-contrib: [1007] trunk/fb-contrib
Brought to you by:
dbrosius
From: <dbr...@us...> - 2008-03-16 02:45:22
|
Revision: 1007 http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1007&view=rev Author: dbrosius Date: 2008-03-15 19:45:28 -0700 (Sat, 15 Mar 2008) Log Message: ----------- don't report WEM when in static no arg methods Modified Paths: -------------- trunk/fb-contrib/samples/WEM_Sample.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/WeakExceptionMessaging.java Modified: trunk/fb-contrib/samples/WEM_Sample.java =================================================================== --- trunk/fb-contrib/samples/WEM_Sample.java 2008-03-16 01:52:58 UTC (rev 1006) +++ trunk/fb-contrib/samples/WEM_Sample.java 2008-03-16 02:45:28 UTC (rev 1007) @@ -12,5 +12,10 @@ if (s.length() == 1) throw new IllegalArgumentException("You stink -->" + s); } + + public static void ok() + { + throw new RuntimeException("Wow"); + } } Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/WeakExceptionMessaging.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/WeakExceptionMessaging.java 2008-03-16 01:52:58 UTC (rev 1006) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/WeakExceptionMessaging.java 2008-03-16 02:45:28 UTC (rev 1007) @@ -92,9 +92,12 @@ */ @Override public void visitCode(Code obj) { - if (prescreen(getMethod())) { - stack.resetForMethodEntry(this); - super.visitCode(obj); + Method method = getMethod(); + if (!method.isStatic() || !method.getSignature().startsWith("()")) { + if (prescreen(getMethod())) { + stack.resetForMethodEntry(this); + super.visitCode(obj); + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |