[Fb-contrib-commit] SF.net SVN: fb-contrib: [952] trunk/fb-contrib/src/com/mebigfatguy/ fbcontrib/d
Brought to you by:
dbrosius
From: <dbr...@us...> - 2007-11-03 03:27:18
|
Revision: 952 http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=952&view=rev Author: dbrosius Date: 2007-11-02 20:27:19 -0700 (Fri, 02 Nov 2007) Log Message: ----------- DLS fixes Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ConfusingFunctionSemantics.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/CopiedOverriddenMethod.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/MisleadingOverloadModel.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SuspiciousJDKVersionUse.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UnrelatedReturnValues.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseAddAll.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ConfusingFunctionSemantics.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ConfusingFunctionSemantics.java 2007-11-03 02:52:55 UTC (rev 951) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/ConfusingFunctionSemantics.java 2007-11-03 03:27:19 UTC (rev 952) @@ -123,10 +123,7 @@ if (possibleParmRegs.size() > 0) { stack.resetForMethodEntry(this); super.visitCode(obj); - for (Map.Entry<Integer, ParmUsage> entry : possibleParmRegs.entrySet()) { - Integer reg = entry.getKey(); - ParmUsage pu = entry.getValue(); - + for (ParmUsage pu : possibleParmRegs.values()) { if (pu.returned && (pu.alteredPC >= 0)) { bugReporter.reportBug(new BugInstance(this, "CFS_CONFUSING_FUNCTION_SEMANTICS", NORMAL_PRIORITY) .addClass(this) Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/CopiedOverriddenMethod.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/CopiedOverriddenMethod.java 2007-11-03 02:52:55 UTC (rev 951) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/CopiedOverriddenMethod.java 2007-11-03 03:27:19 UTC (rev 952) @@ -89,7 +89,7 @@ bugReporter.reportMissingClass(cnfe); } finally { superclassCode = null; - classContext = null; + this.classContext = null; childPoolGen = null; parentPoolGen = null; } Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/MisleadingOverloadModel.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/MisleadingOverloadModel.java 2007-11-03 02:52:55 UTC (rev 951) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/MisleadingOverloadModel.java 2007-11-03 03:27:19 UTC (rev 952) @@ -37,7 +37,7 @@ Method[] methods = cls.getMethods(); for (Method m : methods) { String methodName = m.getName(); - boolean report = false; + boolean report; MethodType newType; if (m.isStatic()) { report = declMethods.get(methodName) == MethodType.INSTANCE; Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SuspiciousJDKVersionUse.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SuspiciousJDKVersionUse.java 2007-11-03 02:52:55 UTC (rev 951) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SuspiciousJDKVersionUse.java 2007-11-03 03:27:19 UTC (rev 952) @@ -125,7 +125,7 @@ @Override public void sawOpcode(int seen) { - String clsName = null; + String clsName; try { if ((seen == INVOKEVIRTUAL) //Interfaces are more difficult, ignore for now Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UnrelatedReturnValues.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UnrelatedReturnValues.java 2007-11-03 02:52:55 UTC (rev 951) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UnrelatedReturnValues.java 2007-11-03 03:27:19 UTC (rev 952) @@ -103,7 +103,7 @@ } JavaClass cls = findCommonType(returnTypes.keySet()); - BugInstance bug = null; + BugInstance bug; if ((cls != null) && !isInherited) { bug = new BugInstance(this, "URV_CHANGE_RETURN_TYPE", priority) .addClass(this) Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseAddAll.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseAddAll.java 2007-11-03 02:52:55 UTC (rev 951) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseAddAll.java 2007-11-03 03:27:19 UTC (rev 952) @@ -119,7 +119,7 @@ @Override public void sawOpcode(int seen) { Comparable regOrField = null; - Comparable uValue = null; + Comparable uValue; boolean sawAlias = false; boolean sawLoad = false; @@ -243,7 +243,6 @@ if (stack.getStackDepth() > 0) { OpcodeStack.Item item = stack.getStackItem(0); if (item.getRegisterNumber() == 0) { - uValue = userValues.get(getNameConstantOperand()); sawLoad = true; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |