[Fb-contrib-commit] SF.net SVN: fb-contrib: [917] trunk/fb-contrib/src/com/mebigfatguy/ fbcontrib/
Brought to you by:
dbrosius
From: <dbr...@us...> - 2007-09-19 05:03:25
|
Revision: 917 http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=917&view=rev Author: dbrosius Date: 2007-09-18 22:03:28 -0700 (Tue, 18 Sep 2007) Log Message: ----------- It's not good enough to find the nestedSB useritem, the value has to be true (TRINARY fix) Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/InefficientStringBuffering.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/InefficientStringBuffering.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/InefficientStringBuffering.java 2007-09-19 04:45:54 UTC (rev 916) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/InefficientStringBuffering.java 2007-09-19 05:03:28 UTC (rev 917) @@ -94,7 +94,7 @@ if (stack.getStackDepth() > 0) { OpcodeStack.Item itm = stack.getStackItem(0); nestedSB = (Boolean)itm.getUserValue(); - if (nestedSB != null) { + if ((nestedSB != null) && nestedSB.booleanValue()) { bugReporter.reportBug( new BugInstance(this, "ISB_INEFFICIENT_STRING_BUFFERING", NORMAL_PRIORITY) .addClass(this) @@ -140,7 +140,8 @@ if (stack.getStackDepth() > 0) { itm = stack.getStackItem(0); - if (itm.getUserValue() != null) { + Boolean uValue = (Boolean)itm.getUserValue(); + if ((uValue != null) && uValue.booleanValue()) { bugReporter.reportBug( new BugInstance(this, "ISB_INEFFICIENT_STRING_BUFFERING", "toString".equals(getMethodName()) ? LOW_PRIORITY : NORMAL_PRIORITY) .addClass(this) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |