Thread: [Fb-contrib-commit] SF.net SVN: fb-contrib: [1011] trunk/fb-contrib/src/com/mebigfatguy/ fbcontrib
Brought to you by:
dbrosius
From: <dbr...@us...> - 2008-03-19 21:52:47
|
Revision: 1011 http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1011&view=rev Author: dbrosius Date: 2008-03-19 14:52:53 -0700 (Wed, 19 Mar 2008) Log Message: ----------- fix for [ 1919533 ] WEM: false positive Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/WeakExceptionMessaging.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/WeakExceptionMessaging.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/WeakExceptionMessaging.java 2008-03-16 18:36:53 UTC (rev 1010) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/WeakExceptionMessaging.java 2008-03-19 21:52:53 UTC (rev 1011) @@ -133,8 +133,10 @@ if (exCls.instanceOf(exceptionClass)) { String sig = getSigConstantOperand(); Type[] argTypes = Type.getArgumentTypes(sig); + int stringParms = 0; for (int t = 0; t < argTypes.length; t++) { if ("Ljava/lang/String;".equals(argTypes[t].getSignature())) { + stringParms++; int stackOffset = argTypes.length - t - 1; if (stack.getStackDepth() > stackOffset) { OpcodeStack.Item item = stack.getStackItem(stackOffset); @@ -143,7 +145,7 @@ } } } - allConstantStrings = true; + allConstantStrings = stringParms > 0; } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2008-03-20 05:39:27
|
Revision: 1012 http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1012&view=rev Author: dbrosius Date: 2008-03-19 22:39:32 -0700 (Wed, 19 Mar 2008) Log Message: ----------- only report WEM for methods with parms, as noparm instance methods are not obvious enough Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/WeakExceptionMessaging.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/WeakExceptionMessaging.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/WeakExceptionMessaging.java 2008-03-19 21:52:53 UTC (rev 1011) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/WeakExceptionMessaging.java 2008-03-20 05:39:32 UTC (rev 1012) @@ -93,7 +93,7 @@ @Override public void visitCode(Code obj) { Method method = getMethod(); - if (!method.isStatic() || !method.getSignature().startsWith("()")) { + if (!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. |
From: <dbr...@us...> - 2008-06-01 20:42:38
|
Revision: 1024 http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1024&view=rev Author: dbrosius Date: 2008-06-01 13:42:45 -0700 (Sun, 01 Jun 2008) Log Message: ----------- @Param s/b @param Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/WeakExceptionMessaging.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/WeakExceptionMessaging.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/WeakExceptionMessaging.java 2008-06-01 20:40:13 UTC (rev 1023) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/WeakExceptionMessaging.java 2008-06-01 20:42:45 UTC (rev 1024) @@ -59,7 +59,7 @@ /** * overrides the visitor to initialize and tear down the opcode stack * - * @Param classContext the context object of the currently parsed class + * @param classContext the context object of the currently parsed class */ @Override public void visitClassContext(ClassContext classContext) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2008-06-07 02:35:32
|
Revision: 1037 http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1037&view=rev Author: dbrosius Date: 2008-06-06 19:35:40 -0700 (Fri, 06 Jun 2008) Log Message: ----------- look for LDC_W as well as LDC Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/WeakExceptionMessaging.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/WeakExceptionMessaging.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/WeakExceptionMessaging.java 2008-06-06 22:44:50 UTC (rev 1036) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/WeakExceptionMessaging.java 2008-06-07 02:35:40 UTC (rev 1037) @@ -122,7 +122,7 @@ .addSourceLine(this)); } } - } else if (seen == LDC) { + } else if ((seen == LDC) || (seen == LDC_W)) { if (getConstantRefOperand() instanceof ConstantString) sawConstant = true; } else if (seen == INVOKESPECIAL) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |