fb-contrib-commit Mailing List for fb-contrib (Page 44)
Brought to you by:
dbrosius
You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(56) |
Oct
(60) |
Nov
(58) |
Dec
(89) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(66) |
Feb
(55) |
Mar
(85) |
Apr
(115) |
May
(35) |
Jun
(28) |
Jul
(3) |
Aug
(48) |
Sep
(37) |
Oct
(22) |
Nov
(14) |
Dec
(66) |
2007 |
Jan
(45) |
Feb
(63) |
Mar
(10) |
Apr
(1) |
May
(1) |
Jun
(12) |
Jul
|
Aug
|
Sep
(25) |
Oct
(21) |
Nov
(39) |
Dec
|
2008 |
Jan
(7) |
Feb
|
Mar
(26) |
Apr
(5) |
May
(2) |
Jun
(32) |
Jul
(9) |
Aug
(10) |
Sep
|
Oct
(3) |
Nov
(1) |
Dec
|
2009 |
Jan
(10) |
Feb
(31) |
Mar
(32) |
Apr
(35) |
May
(25) |
Jun
|
Jul
(31) |
Aug
(10) |
Sep
(95) |
Oct
(35) |
Nov
(10) |
Dec
(34) |
2010 |
Jan
(90) |
Feb
(4) |
Mar
(7) |
Apr
(20) |
May
(20) |
Jun
(13) |
Jul
(7) |
Aug
(18) |
Sep
(25) |
Oct
(4) |
Nov
(16) |
Dec
(2) |
2011 |
Jan
(1) |
Feb
|
Mar
(11) |
Apr
(3) |
May
(2) |
Jun
(26) |
Jul
(10) |
Aug
(2) |
Sep
|
Oct
(1) |
Nov
(1) |
Dec
(1) |
2012 |
Jan
(3) |
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(14) |
Nov
(3) |
Dec
(4) |
2013 |
Jan
(3) |
Feb
(2) |
Mar
(1) |
Apr
(4) |
May
|
Jun
(1) |
Jul
(3) |
Aug
|
Sep
|
Oct
(4) |
Nov
(3) |
Dec
(3) |
2014 |
Jan
(4) |
Feb
(2) |
Mar
(4) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
(3) |
Dec
(3) |
2016 |
Jan
(2) |
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
(1) |
Aug
(2) |
Sep
(4) |
Oct
(2) |
Nov
(7) |
Dec
|
2017 |
Jan
(1) |
Feb
|
Mar
(4) |
Apr
(5) |
May
(2) |
Jun
|
Jul
(2) |
Aug
|
Sep
(4) |
Oct
|
Nov
|
Dec
(3) |
2018 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
(5) |
Jun
(2) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <dbr...@us...> - 2007-01-03 22:55:40
|
Revision: 766 http://svn.sourceforge.net/fb-contrib/?rev=766&view=rev Author: dbrosius Date: 2007-01-03 14:55:37 -0800 (Wed, 03 Jan 2007) Log Message: ----------- Bug 1626633: visitCode(obj) needs to call super.visitCode(obj) not, super.visit(obj) 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-01-02 18:24:44 UTC (rev 765) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/InefficientStringBuffering.java 2007-01-03 22:55:37 UTC (rev 766) @@ -69,7 +69,7 @@ if (obj.getCode() != null) { stack.resetForMethodEntry(this); sawLDCEmpty = false; - super.visit(obj); + super.visitCode(obj); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2007-01-02 18:24:47
|
Revision: 765 http://svn.sourceforge.net/fb-contrib/?rev=765&view=rev Author: dbrosius Date: 2007-01-02 10:24:44 -0800 (Tue, 02 Jan 2007) Log Message: ----------- made a copy Added Paths: ----------- tags/v3_0_5/ Copied: tags/v3_0_5 (from rev 764, trunk/fb-contrib) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2006-12-28 22:18:41
|
Revision: 764 http://svn.sourceforge.net/fb-contrib/?rev=764&view=rev Author: dbrosius Date: 2006-12-28 14:18:31 -0800 (Thu, 28 Dec 2006) Log Message: ----------- prepare for release 3.0.5 Modified Paths: -------------- trunk/fb-contrib/build.xml trunk/fb-contrib/etc/findbugs.xml Modified: trunk/fb-contrib/build.xml =================================================================== --- trunk/fb-contrib/build.xml 2006-12-26 02:44:03 UTC (rev 763) +++ trunk/fb-contrib/build.xml 2006-12-28 22:18:31 UTC (rev 764) @@ -20,7 +20,7 @@ <property name="javac.deprecation" value="on"/> <property name="javac.debug" value="on"/> - <property name="fb-contrib.version" value="3.1.0"/> + <property name="fb-contrib.version" value="3.0.5"/> <target name="clean" description="removes all generated collateral"> <delete dir="${classes.dir}"/> Modified: trunk/fb-contrib/etc/findbugs.xml =================================================================== --- trunk/fb-contrib/etc/findbugs.xml 2006-12-26 02:44:03 UTC (rev 763) +++ trunk/fb-contrib/etc/findbugs.xml 2006-12-28 22:18:31 UTC (rev 764) @@ -252,23 +252,28 @@ <Detector class="com.mebigfatguy.fbcontrib.detect.SuspiciousComparatorReturnValues" speed="fast" - reports="SC_SUSPICIOUS_COMPARATOR_RETURN_VALUES"/> + reports="SC_SUSPICIOUS_COMPARATOR_RETURN_VALUES" + disabled="true" /> <Detector class="com.mebigfatguy.fbcontrib.detect.SillynessPotPourri" speed="fast" - reports="SPP_NEGATIVE_BITSET_ITEM,SPP_INTERN_ON_CONSTANT,SPP_NO_CHAR_SB_CTOR,SPP_USE_MATH_CONSTANT,SPP_STUTTERED_ASSIGNMENT,SPP_USE_ISNAN,SPP_USE_BIGDECIMAL_STRING_CTOR,SPP_STRINGBUFFER_WITH_EMPTY_STRING"/> + reports="SPP_NEGATIVE_BITSET_ITEM,SPP_INTERN_ON_CONSTANT,SPP_NO_CHAR_SB_CTOR,SPP_USE_MATH_CONSTANT,SPP_STUTTERED_ASSIGNMENT,SPP_USE_ISNAN,SPP_USE_BIGDECIMAL_STRING_CTOR,SPP_STRINGBUFFER_WITH_EMPTY_STRING" + disabled="true" /> <Detector class="com.mebigfatguy.fbcontrib.detect.BloatedAssignmentScope" speed="fast" - reports="BAS_BLOATED_ASSIGNMENT_SCOPE" /> + reports="BAS_BLOATED_ASSIGNMENT_SCOPE" + disabled="true" /> <Detector class="com.mebigfatguy.fbcontrib.detect.SpoiledChildInterfaceImplementor" speed="fast" - reports="SCI_SPOILED_CHILD_INTERFACE_IMPLEMENTOR" /> + reports="SCI_SPOILED_CHILD_INTERFACE_IMPLEMENTOR" + disabled="true" /> <Detector class="com.mebigfatguy.fbcontrib.detect.DeletingWhileIterating" speed="fast" - reports="DWI_DELETING_WHILE_ITERATING" /> + reports="DWI_DELETING_WHILE_ITERATING" + disabled="true" /> <!-- BugPattern --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2006-12-26 02:44:05
|
Revision: 763 http://svn.sourceforge.net/fb-contrib/?rev=763&view=rev Author: dbrosius Date: 2006-12-25 18:44:03 -0800 (Mon, 25 Dec 2006) Log Message: ----------- update to 1.1.2 Modified Paths: -------------- trunk/fb-contrib/lib/findbugs.jar Modified: trunk/fb-contrib/lib/findbugs.jar =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2006-12-23 16:29:24
|
Revision: 762 http://svn.sourceforge.net/fb-contrib/?rev=762&view=rev Author: dbrosius Date: 2006-12-23 08:29:18 -0800 (Sat, 23 Dec 2006) Log Message: ----------- Modified Paths: -------------- trunk/fb-contrib/samples/FPL_Sample.java Modified: trunk/fb-contrib/samples/FPL_Sample.java =================================================================== --- trunk/fb-contrib/samples/FPL_Sample.java 2006-12-22 21:39:08 UTC (rev 761) +++ trunk/fb-contrib/samples/FPL_Sample.java 2006-12-23 16:29:18 UTC (rev 762) @@ -18,7 +18,7 @@ public void testTougherFloat(String s) { - for (float f = 0.0f; f < Double.valueOf(s); f+=1.0f) + for (float f = 0.0f; f < Double.valueOf(s).doubleValue(); f+=1.0f) { } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2006-12-22 21:39:08
|
Revision: 761 http://svn.sourceforge.net/fb-contrib/?rev=761&view=rev Author: dbrosius Date: 2006-12-22 13:39:08 -0800 (Fri, 22 Dec 2006) Log Message: ----------- warnings Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/collect/CollectStatistics.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/collect/CollectStatistics.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/collect/CollectStatistics.java 2006-12-22 21:38:07 UTC (rev 760) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/collect/CollectStatistics.java 2006-12-22 21:39:08 UTC (rev 761) @@ -10,6 +10,7 @@ { private int numMethodCalls; + @SuppressWarnings("unused") public CollectStatistics(BugReporter bugReporter) { Statistics.getStatistics().clear(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2006-12-22 21:38:27
|
Revision: 760 http://svn.sourceforge.net/fb-contrib/?rev=760&view=rev Author: dbrosius Date: 2006-12-22 13:38:07 -0800 (Fri, 22 Dec 2006) Log Message: ----------- avoid autoboxing Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java 2006-12-22 21:37:28 UTC (rev 759) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java 2006-12-22 21:38:07 UTC (rev 760) @@ -510,7 +510,7 @@ bugReporter.reportBug(new BugInstance(BloatedAssignmentScope.this, "BAS_BLOATED_ASSIGNMENT_SCOPE", NORMAL_PRIORITY) .addClass(BloatedAssignmentScope.this) .addMethod(BloatedAssignmentScope.this) - .addSourceLine(BloatedAssignmentScope.this, entry.getValue())); + .addSourceLine(BloatedAssignmentScope.this, entry.getValue().intValue())); } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2006-12-22 21:37:29
|
Revision: 759 http://svn.sourceforge.net/fb-contrib/?rev=759&view=rev Author: dbrosius Date: 2006-12-22 13:37:28 -0800 (Fri, 22 Dec 2006) Log Message: ----------- avoid autoboxing Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java 2006-12-22 21:36:39 UTC (rev 758) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java 2006-12-22 21:37:28 UTC (rev 759) @@ -186,7 +186,7 @@ groupToIterator.put(id, Integer14.valueOf(reg)); } - Set<Comparable> group = collectionGroups.get(id); + Set<Comparable> group = collectionGroups.get(id.intValue()); if (group != null) { group.add(Integer14.valueOf(reg)); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2006-12-22 21:36:40
|
Revision: 758 http://svn.sourceforge.net/fb-contrib/?rev=758&view=rev Author: dbrosius Date: 2006-12-22 13:36:39 -0800 (Fri, 22 Dec 2006) Log Message: ----------- avoid autoboxing Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PossiblyRedundantMethodCalls.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PossiblyRedundantMethodCalls.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PossiblyRedundantMethodCalls.java 2006-12-22 21:35:57 UTC (rev 757) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PossiblyRedundantMethodCalls.java 2006-12-22 21:36:39 UTC (rev 758) @@ -155,7 +155,7 @@ branchTargets.clear(); CodeException[] codeExceptions = obj.getExceptionTable(); for (CodeException codeEx : codeExceptions) { - branchTargets.add(codeEx.getHandlerPC()); + branchTargets.add(Integer14.valueOf(codeEx.getHandlerPC())); } super.visitCode(obj); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2006-12-22 21:36:01
|
Revision: 757 http://svn.sourceforge.net/fb-contrib/?rev=757&view=rev Author: dbrosius Date: 2006-12-22 13:35:57 -0800 (Fri, 22 Dec 2006) Log Message: ----------- avoid autoboxing Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseToArray.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseToArray.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseToArray.java 2006-12-22 21:34:42 UTC (rev 756) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseToArray.java 2006-12-22 21:35:57 UTC (rev 757) @@ -143,9 +143,8 @@ } else if (((seen == ISTORE) || ((seen >= ISTORE_0) && (seen <= ISTORE_3))) || ((seen == ASTORE) || ((seen >= ASTORE_0) && (seen <= ASTORE_3)))) { if (stack.getStackDepth() > 0) { - reg = Integer14.valueOf(RegisterUtils.getStoreReg(this, seen)); uValue = stack.getStackItem(0).getUserValue(); - userValues.put(reg, uValue); + userValues.put(Integer14.valueOf(RegisterUtils.getStoreReg(this, seen)), uValue); } } else if (((seen == ILOAD) || ((seen >= ILOAD_0) && (seen <= ILOAD_3))) || ((seen == ALOAD) || ((seen >= ALOAD_0) && (seen <= ALOAD_3)))) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2006-12-22 21:34:46
|
Revision: 756 http://svn.sourceforge.net/fb-contrib/?rev=756&view=rev Author: dbrosius Date: 2006-12-22 13:34:42 -0800 (Fri, 22 Dec 2006) Log Message: ----------- fix up imports Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SuspiciousComparatorReturnValues.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SuspiciousComparatorReturnValues.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SuspiciousComparatorReturnValues.java 2006-12-22 21:34:17 UTC (rev 755) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SuspiciousComparatorReturnValues.java 2006-12-22 21:34:42 UTC (rev 756) @@ -8,8 +8,6 @@ import org.apache.bcel.classfile.JavaClass; import org.apache.bcel.generic.Type; -import com.mebigfatguy.fbcontrib.utils.Integer14; - import edu.umd.cs.findbugs.BugInstance; import edu.umd.cs.findbugs.BugReporter; import edu.umd.cs.findbugs.BytecodeScanningDetector; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2006-12-22 21:34:20
|
Revision: 755 http://svn.sourceforge.net/fb-contrib/?rev=755&view=rev Author: dbrosius Date: 2006-12-22 13:34:17 -0800 (Fri, 22 Dec 2006) Log Message: ----------- avoid autoboxing Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SuspiciousComparatorReturnValues.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SuspiciousComparatorReturnValues.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SuspiciousComparatorReturnValues.java 2006-12-22 21:33:16 UTC (rev 754) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SuspiciousComparatorReturnValues.java 2006-12-22 21:34:17 UTC (rev 755) @@ -8,6 +8,8 @@ import org.apache.bcel.classfile.JavaClass; import org.apache.bcel.generic.Type; +import com.mebigfatguy.fbcontrib.utils.Integer14; + import edu.umd.cs.findbugs.BugInstance; import edu.umd.cs.findbugs.BugReporter; import edu.umd.cs.findbugs.BytecodeScanningDetector; @@ -73,7 +75,7 @@ String methodSig = getMethodSig(); if (methodName.equals(methodInfo[0]) && methodSig.endsWith(methodInfo[2]) - && (Type.getArgumentTypes(methodSig).length == Integer.valueOf(methodInfo[1]))) { + && (Type.getArgumentTypes(methodSig).length == Integer.valueOf(methodInfo[1]).intValue())) { stack.resetForMethodEntry(this); indeterminate = false; seenNegative = false; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2006-12-22 21:33:20
|
Revision: 754 http://svn.sourceforge.net/fb-contrib/?rev=754&view=rev Author: dbrosius Date: 2006-12-22 13:33:16 -0800 (Fri, 22 Dec 2006) Log Message: ----------- remove unused parm Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NeedlessMemberCollectionSynchronization.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NeedlessMemberCollectionSynchronization.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NeedlessMemberCollectionSynchronization.java 2006-12-22 21:32:07 UTC (rev 753) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NeedlessMemberCollectionSynchronization.java 2006-12-22 21:33:16 UTC (rev 754) @@ -218,7 +218,7 @@ stack.mergeJumps(this); isSyncCollection = isSyncCollectionCreation(seen); if (seen == PUTSTATIC) - processCollectionStore(seen); + processCollectionStore(); } finally { stack.sawOpcode(this, seen); if (isSyncCollection) { @@ -242,7 +242,7 @@ stack.mergeJumps(this); isSyncCollection = isSyncCollectionCreation(seen); if (seen == PUTFIELD) - processCollectionStore(seen); + processCollectionStore(); } finally { stack.sawOpcode(this, seen); if (isSyncCollection) { @@ -359,10 +359,8 @@ /** * sets the source line annotation of a store to a collection if that collection * is synchronized. - * - * @param seen the opcode of the currently parsed instruction */ - private void processCollectionStore(int seen) { + private void processCollectionStore() { String fieldClassName = getDottedClassConstantOperand(); if (fieldClassName.equals(className)) { if (stack.getStackDepth() > 0) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2006-12-22 21:32:13
|
Revision: 753 http://svn.sourceforge.net/fb-contrib/?rev=753&view=rev Author: dbrosius Date: 2006-12-22 13:32:07 -0800 (Fri, 22 Dec 2006) Log Message: ----------- avoid autoboxing Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java 2006-12-22 19:01:24 UTC (rev 752) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java 2006-12-22 21:32:07 UTC (rev 753) @@ -151,7 +151,7 @@ OpcodeStack.Item itm = stack.getStackItem(1); int id = findCollectionGroup(itm, true); if (id >= 0) { - Integer it = groupToIterator.get(id); + Integer it = groupToIterator.get(Integer14.valueOf(id)); Loop loop = loops.get(it); if (loop != null) { int pc = getPC(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2006-12-22 19:01:26
|
Revision: 752 http://svn.sourceforge.net/fb-contrib/?rev=752&view=rev Author: dbrosius Date: 2006-12-22 11:01:24 -0800 (Fri, 22 Dec 2006) Log Message: ----------- add @Override annotations Modified Paths: -------------- trunk/fb-contrib/samples/URV_Sample.java Modified: trunk/fb-contrib/samples/URV_Sample.java =================================================================== --- trunk/fb-contrib/samples/URV_Sample.java 2006-12-22 18:55:26 UTC (rev 751) +++ trunk/fb-contrib/samples/URV_Sample.java 2006-12-22 19:01:24 UTC (rev 752) @@ -19,6 +19,7 @@ return ""; } + @Override public Object getInheritedInfo(boolean b) { if (b) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2006-12-22 18:55:27
|
Revision: 751 http://svn.sourceforge.net/fb-contrib/?rev=751&view=rev Author: dbrosius Date: 2006-12-22 10:55:26 -0800 (Fri, 22 Dec 2006) Log Message: ----------- add @Override annotations Modified Paths: -------------- trunk/fb-contrib/samples/AOM_Sample.java trunk/fb-contrib/samples/COM_Sample.java trunk/fb-contrib/samples/ISB_Sample.java trunk/fb-contrib/samples/NRTL_Sample.java trunk/fb-contrib/samples/RMC_Sample.java trunk/fb-contrib/samples/STS_Sample.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/BloatedSynchronizedBlock.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/CopiedOverriddenMethod.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/FieldCouldBeLocal.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/InefficientStringBuffering.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/JDBCVendorReliance.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NonOwnedSynchronization.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PossiblyRedundantMethodCalls.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SillynessPotPourri.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SloppyClassReflection.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SluggishGui.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SuspiciousComparatorReturnValues.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UnrelatedReturnValues.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseEnumCollections.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseToArray.java Modified: trunk/fb-contrib/samples/AOM_Sample.java =================================================================== --- trunk/fb-contrib/samples/AOM_Sample.java 2006-12-22 18:23:27 UTC (rev 750) +++ trunk/fb-contrib/samples/AOM_Sample.java 2006-12-22 18:55:26 UTC (rev 751) @@ -13,6 +13,7 @@ public abstract class AOM_Sample extends AOM_Super { + @Override public abstract void test1(); public abstract void test2(); } Modified: trunk/fb-contrib/samples/COM_Sample.java =================================================================== --- trunk/fb-contrib/samples/COM_Sample.java 2006-12-22 18:23:27 UTC (rev 750) +++ trunk/fb-contrib/samples/COM_Sample.java 2006-12-22 18:55:26 UTC (rev 751) @@ -24,10 +24,12 @@ public static class Derived extends COM_Sample { + @Override public void test1() { } + @Override public Set<String> test3(String a, String b, String c) { Set<String> ss = new HashSet<String>(); @@ -37,6 +39,7 @@ return ss; } + @Override public String test2(int i) { return String.valueOf(i); Modified: trunk/fb-contrib/samples/ISB_Sample.java =================================================================== --- trunk/fb-contrib/samples/ISB_Sample.java 2006-12-22 18:23:27 UTC (rev 750) +++ trunk/fb-contrib/samples/ISB_Sample.java 2006-12-22 18:55:26 UTC (rev 751) @@ -59,6 +59,7 @@ return sb.toString(); } + @Override public String toString() { String a = System.getProperty("foo"); Modified: trunk/fb-contrib/samples/NRTL_Sample.java =================================================================== --- trunk/fb-contrib/samples/NRTL_Sample.java 2006-12-22 18:23:27 UTC (rev 750) +++ trunk/fb-contrib/samples/NRTL_Sample.java 2006-12-22 18:55:26 UTC (rev 751) @@ -10,6 +10,7 @@ sample = s; } + @Override public int doStartTag() throws JspException { try { sample += Math.random(); @@ -25,6 +26,7 @@ sample2 = s; } + @Override public int doEndTag() { return EVAL_PAGE; } Modified: trunk/fb-contrib/samples/RMC_Sample.java =================================================================== --- trunk/fb-contrib/samples/RMC_Sample.java 2006-12-22 18:23:27 UTC (rev 750) +++ trunk/fb-contrib/samples/RMC_Sample.java 2006-12-22 18:55:26 UTC (rev 751) @@ -21,6 +21,7 @@ int j = bb.getInt(); } + @Override public boolean equals(Object o) { RMC_Sample rmc = (RMC_Sample)o; Modified: trunk/fb-contrib/samples/STS_Sample.java =================================================================== --- trunk/fb-contrib/samples/STS_Sample.java 2006-12-22 18:23:27 UTC (rev 750) +++ trunk/fb-contrib/samples/STS_Sample.java 2006-12-22 18:55:26 UTC (rev 751) @@ -30,6 +30,7 @@ c = calc; } + @Override public void run() { synchronized(c) @@ -51,6 +52,7 @@ { int total; + @Override public void run() { synchronized(this) Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java 2006-12-22 18:23:27 UTC (rev 750) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java 2006-12-22 18:55:26 UTC (rev 751) @@ -327,6 +327,7 @@ * * @returns a string representation */ + @Override public String toString() { return "Start=" + startLocation + " Finish=" + finishLocation + " Loop=" + isLoop + " Loads=" + loads + " Stores=" + stores; } Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/BloatedSynchronizedBlock.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/BloatedSynchronizedBlock.java 2006-12-22 18:23:27 UTC (rev 750) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/BloatedSynchronizedBlock.java 2006-12-22 18:55:26 UTC (rev 751) @@ -118,6 +118,7 @@ * * @param seen the opcode of the currently parsed instruction */ + @Override public void sawOpcode(int seen) { try { stack.mergeJumps(this); Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/CopiedOverriddenMethod.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/CopiedOverriddenMethod.java 2006-12-22 18:23:27 UTC (rev 750) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/CopiedOverriddenMethod.java 2006-12-22 18:55:26 UTC (rev 751) @@ -100,6 +100,7 @@ * * @param obj the method object for the currently parsed method */ + @Override public void visitMethod(Method obj) { curMethodInfo = obj.getName() + ":" + obj.getSignature(); } @@ -109,6 +110,7 @@ * * @param obj the code object of the currently parsed method */ + @Override public void visitCode(Code obj) { Method m = getMethod(); if (!m.isPublic() && !m.isProtected() && !m.isAbstract()) Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java 2006-12-22 18:23:27 UTC (rev 750) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java 2006-12-22 18:55:26 UTC (rev 751) @@ -84,6 +84,7 @@ * * @param classContext the context object of the currently parsed class */ + @Override public void visitClassContext(ClassContext classContext) { if ((collectionClass == null) || (iteratorClass == null)) return; @@ -107,6 +108,7 @@ * * @param obj the context object of the currently parsed code block */ + @Override public void visitCode(Code obj) { stack.resetForMethodEntry(this); collectionGroups.clear(); @@ -120,6 +122,7 @@ * * @param seen the opcode of the currently parsed instruction */ + @Override public void sawOpcode(int seen) { int groupId = -1; Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/FieldCouldBeLocal.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/FieldCouldBeLocal.java 2006-12-22 18:23:27 UTC (rev 750) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/FieldCouldBeLocal.java 2006-12-22 18:55:26 UTC (rev 751) @@ -115,6 +115,7 @@ * * @param obj the context object of the currently parsed method */ + @Override public void visitMethod(Method obj) { if (localizableFields.size() == 0) return; @@ -172,6 +173,7 @@ * * @param seen the opcode of the currently visited instruction */ + @Override public void sawOpcode(int seen) { if ((seen == GETFIELD) || (seen == PUTFIELD)) { String fieldName = getNameConstantOperand(); Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/InefficientStringBuffering.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/InefficientStringBuffering.java 2006-12-22 18:23:27 UTC (rev 750) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/InefficientStringBuffering.java 2006-12-22 18:55:26 UTC (rev 751) @@ -50,6 +50,7 @@ * * @param classContext the context object of the currently parsed class */ + @Override public void visitClassContext(ClassContext classContext) { try { stack = new OpcodeStack(); Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/JDBCVendorReliance.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/JDBCVendorReliance.java 2006-12-22 18:23:27 UTC (rev 750) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/JDBCVendorReliance.java 2006-12-22 18:55:26 UTC (rev 751) @@ -52,6 +52,12 @@ this.bugReporter = bugReporter; } + /** + * implements the visitor to reset the stack and jdbc locals + * + * @param classContext the context object of the currently parsed class + */ + @Override public void visitClassContext(ClassContext classContext) { stack = new OpcodeStack(); jdbcLocals = new HashMap<Integer, Integer>(); @@ -81,6 +87,7 @@ } } + @Override public void sawOpcode(int seen) { boolean tosIsJDBC = false; try { Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NonOwnedSynchronization.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NonOwnedSynchronization.java 2006-12-22 18:23:27 UTC (rev 750) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NonOwnedSynchronization.java 2006-12-22 18:55:26 UTC (rev 751) @@ -92,6 +92,7 @@ * * @param seen the opcode of the currently parsed instruction */ + @Override public void sawOpcode(int seen) { Integer tosIsPriority = null; try { Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PossiblyRedundantMethodCalls.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PossiblyRedundantMethodCalls.java 2006-12-22 18:23:27 UTC (rev 750) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PossiblyRedundantMethodCalls.java 2006-12-22 18:55:26 UTC (rev 751) @@ -126,6 +126,7 @@ * * @param classContext the context object of the currently visited class */ + @Override public void visitClassContext(ClassContext classContext) { try { stack = new OpcodeStack(); @@ -146,6 +147,7 @@ * * @param obj the context object of the currently parsed code block */ + @Override public void visitCode(Code obj) { stack.resetForMethodEntry(this); localMethodCalls.clear(); @@ -164,6 +166,7 @@ * * @param seen the opcode of the currently parsed instruction */ + @Override public void sawOpcode(int seen) { try { stack.mergeJumps(this); Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SillynessPotPourri.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SillynessPotPourri.java 2006-12-22 18:23:27 UTC (rev 750) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SillynessPotPourri.java 2006-12-22 18:55:26 UTC (rev 751) @@ -47,6 +47,7 @@ this.bugReporter = bugReporter; } + @Override public void visitClassContext(ClassContext classContext) { try { stack = new OpcodeStack(); @@ -61,6 +62,7 @@ * * @param obj the context object for the currently parsed Code */ + @Override public void visitCode(Code obj) { stack.resetForMethodEntry(this); lastOpcode = -1; @@ -73,6 +75,7 @@ * * @param seen the opcode of the currently parsed instruction */ + @Override public void sawOpcode(int seen) { int reg = -1; try { Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SloppyClassReflection.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SloppyClassReflection.java 2006-12-22 18:23:27 UTC (rev 750) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SloppyClassReflection.java 2006-12-22 18:55:26 UTC (rev 751) @@ -110,6 +110,7 @@ super.visitMethod(obj); } + @Override public void visitField(Field obj) { if (state == COLLECT) { Type t = obj.getType(); Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SluggishGui.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SluggishGui.java 2006-12-22 18:23:27 UTC (rev 750) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SluggishGui.java 2006-12-22 18:55:26 UTC (rev 751) @@ -181,6 +181,7 @@ * * @param seen the currently parsed opcode */ + @Override public void sawOpcode(int seen) { if (methodReported) return; Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SuspiciousComparatorReturnValues.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SuspiciousComparatorReturnValues.java 2006-12-22 18:23:27 UTC (rev 750) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SuspiciousComparatorReturnValues.java 2006-12-22 18:55:26 UTC (rev 751) @@ -47,6 +47,7 @@ this.bugReporter = bugReporter; } + @Override public void visitClassContext(ClassContext classContext) { try { JavaClass cls = classContext.getJavaClass(); @@ -66,6 +67,7 @@ } } + @Override public void visitCode(Code obj) { String methodName = getMethodName(); String methodSig = getMethodSig(); @@ -90,6 +92,7 @@ } } + @Override public void sawOpcode(int seen) { try { if (indeterminate) Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UnrelatedReturnValues.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UnrelatedReturnValues.java 2006-12-22 18:23:27 UTC (rev 750) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UnrelatedReturnValues.java 2006-12-22 18:55:26 UTC (rev 751) @@ -62,6 +62,7 @@ * * @param classContext the context object of the currently parsed class */ + @Override public void visitClassContext(ClassContext classContext) { try { currentClass = classContext.getJavaClass(); @@ -138,6 +139,7 @@ * * @param seen the opcode of the currently parsed instruction */ + @Override public void sawOpcode(int seen) { try { stack.mergeJumps(this); Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseEnumCollections.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseEnumCollections.java 2006-12-22 18:23:27 UTC (rev 750) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseEnumCollections.java 2006-12-22 18:55:26 UTC (rev 751) @@ -71,6 +71,7 @@ * * @param classContext the context object for the currently parsed class */ + @Override public void visitClassContext(ClassContext classContext) { try { JavaClass cls = classContext.getJavaClass(); @@ -94,6 +95,7 @@ * * @param obj the context object for the currently parsed method */ + @Override public void visitMethod(Method obj) { stack.resetForMethodEntry(this); methodReported = false; @@ -101,6 +103,7 @@ super.visitMethod(obj); } + @Override public void sawOpcode(int seen) { Boolean sawEnumCollectionCreation = null; //true - enum, false - nonenum try { Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseToArray.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseToArray.java 2006-12-22 18:23:27 UTC (rev 750) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/UseToArray.java 2006-12-22 18:55:26 UTC (rev 751) @@ -64,6 +64,7 @@ * * @param classContext the context object of the currently parsed class */ + @Override public void visitClassContext(ClassContext classContext) { if (collectionClass == null) { if (ex != null) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2006-12-22 18:23:33
|
Revision: 750 http://svn.sourceforge.net/fb-contrib/?rev=750&view=rev Author: dbrosius Date: 2006-12-22 10:23:27 -0800 (Fri, 22 Dec 2006) Log Message: ----------- use locale based toLowerCase Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PossiblyRedundantMethodCalls.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PossiblyRedundantMethodCalls.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PossiblyRedundantMethodCalls.java 2006-12-22 18:22:12 UTC (rev 749) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PossiblyRedundantMethodCalls.java 2006-12-22 18:23:27 UTC (rev 750) @@ -79,7 +79,7 @@ if (userNameProp != null) { String[] userNames = userNameProp.split("\\s*,\\s*"); for (String name : userNames) - riskyMethodNameContents.add(name.toLowerCase()); + riskyMethodNameContents.add(name.toLowerCase(Locale.getDefault())); } Integer prop = Integer.getInteger(PRMC_HIGH_BYTECOUNT); if (prop != null) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2006-12-22 18:22:14
|
Revision: 749 http://svn.sourceforge.net/fb-contrib/?rev=749&view=rev Author: dbrosius Date: 2006-12-22 10:22:12 -0800 (Fri, 22 Dec 2006) Log Message: ----------- remove dead store Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/collect/Statistics.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/collect/Statistics.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/collect/Statistics.java 2006-12-22 18:21:00 UTC (rev 748) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/collect/Statistics.java 2006-12-22 18:22:12 UTC (rev 749) @@ -22,12 +22,6 @@ } public void addMethodStatistics(String className, String methodName, String signature, MethodInfo methodInfo) { - long hashCode = className.hashCode(); - hashCode <<= 8; - hashCode |= methodName.hashCode(); - hashCode <<= 8; - hashCode |= signature.hashCode(); - Long key = getKey(className, methodName, signature); if (methodStatistics.containsKey(key)) methodStatistics.put(key, getValue(new MethodInfo())); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2006-12-22 18:21:00
|
Revision: 748 http://svn.sourceforge.net/fb-contrib/?rev=748&view=rev Author: dbrosius Date: 2006-12-22 10:21:00 -0800 (Fri, 22 Dec 2006) Log Message: ----------- BAS fixes Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DubiousListCollection.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NeedlessMemberCollectionSynchronization.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/OverlyConcreteParameter.java trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SluggishGui.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DubiousListCollection.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DubiousListCollection.java 2006-12-22 04:18:42 UTC (rev 747) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DubiousListCollection.java 2006-12-22 18:21:00 UTC (rev 748) @@ -127,15 +127,15 @@ if (seen == INVOKEINTERFACE) { String className = this.getClassConstantOperand(); - String methodName = getNameConstantOperand(); - String signature = getSigConstantOperand(); if (className.startsWith("java/util/") && className.endsWith("List")) { + String signature = getSigConstantOperand(); XField field = getFieldFromStack(stack, signature); if (field != null) { String fieldName = field.getName(); FieldInfo fi = fieldsReported.get(fieldName); if (fi != null) { + String methodName = getNameConstantOperand(); String methodInfo = methodName + signature; if (listMethods.contains(methodInfo)) fieldsReported.remove(fieldName); Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NeedlessMemberCollectionSynchronization.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NeedlessMemberCollectionSynchronization.java 2006-12-22 04:18:42 UTC (rev 747) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/NeedlessMemberCollectionSynchronization.java 2006-12-22 18:21:00 UTC (rev 748) @@ -364,11 +364,11 @@ */ private void processCollectionStore(int seen) { String fieldClassName = getDottedClassConstantOperand(); - String fieldName = getNameConstantOperand(); if (fieldClassName.equals(className)) { if (stack.getStackDepth() > 0) { OpcodeStack.Item item = stack.getStackItem(0); if (item.getUserValue() != null) { + String fieldName = getNameConstantOperand(); if (fieldName != null) { FieldInfo fi = collectionFields.get(fieldName); if (fi != null) { Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/OverlyConcreteParameter.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/OverlyConcreteParameter.java 2006-12-22 04:18:42 UTC (rev 747) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/OverlyConcreteParameter.java 2006-12-22 18:21:00 UTC (rev 748) @@ -321,12 +321,13 @@ } private void removeUselessDefiners(final int reg) { - String methodSig = getSigConstantOperand(); - String methodName = getNameConstantOperand(); - String methodInfo = methodName + methodSig; Map<JavaClass, List<String>> definers = parameterDefiners.get(Integer14.valueOf(reg)); if ((definers != null) && (definers.size() > 0)) { + String methodSig = getSigConstantOperand(); + String methodName = getNameConstantOperand(); + String methodInfo = methodName + methodSig; + Iterator<List<String>> it = definers.values().iterator(); while (it.hasNext()) { boolean methodDefined = false; Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SluggishGui.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SluggishGui.java 2006-12-22 04:18:42 UTC (rev 747) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SluggishGui.java 2006-12-22 18:21:00 UTC (rev 748) @@ -192,7 +192,6 @@ String clsName = getClassConstantOperand(); String methodName = getNameConstantOperand(); String methodInfo = clsName + ":" + methodName; - String methodSig = getSigConstantOperand(); String thisMethodInfo = (clsName.equals(getClassName())) ? (methodName + ":" + methodSig) : "0"; if (expensiveCalls.contains(methodInfo) || expensiveThisCalls.contains(thisMethodInfo)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2006-12-22 04:18:46
|
Revision: 747 http://svn.sourceforge.net/fb-contrib/?rev=747&view=rev Author: dbrosius Date: 2006-12-21 20:18:42 -0800 (Thu, 21 Dec 2006) Log Message: ----------- if the implementing class is not an application class, report SCII as low Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SpoiledChildInterfaceImplementor.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SpoiledChildInterfaceImplementor.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SpoiledChildInterfaceImplementor.java 2006-12-21 09:12:31 UTC (rev 746) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SpoiledChildInterfaceImplementor.java 2006-12-22 04:18:42 UTC (rev 747) @@ -27,6 +27,7 @@ import edu.umd.cs.findbugs.BugInstance; import edu.umd.cs.findbugs.BugReporter; import edu.umd.cs.findbugs.Detector; +import edu.umd.cs.findbugs.ba.AnalysisContext; import edu.umd.cs.findbugs.ba.ClassContext; /** @@ -69,8 +70,10 @@ if (infMethods.size() > 0) { infMethods.removeAll(clsMethods); if (infMethods.size() > 0) { - if (!cls.getSuperClass().implementationOf(inf)) { - BugInstance bi = new BugInstance(this, "SCII_SPOILED_CHILD_INTERFACE_IMPLEMENTATOR", NORMAL_PRIORITY) + JavaClass superCls = cls.getSuperClass(); + if (!superCls.implementationOf(inf)) { + int priority = AnalysisContext.currentAnalysisContext().getSubtypes().isApplicationClass(superCls) ? NORMAL_PRIORITY : LOW_PRIORITY; + BugInstance bi = new BugInstance(this, "SCII_SPOILED_CHILD_INTERFACE_IMPLEMENTATOR", priority) .addClass(cls) .addString("Implementing interface: " + inf.getClassName()) .addString("Methods:"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2006-12-21 09:12:32
|
Revision: 746 http://svn.sourceforge.net/fb-contrib/?rev=746&view=rev Author: dbrosius Date: 2006-12-21 01:12:31 -0800 (Thu, 21 Dec 2006) Log Message: ----------- bump to dev version 3.1.0 Modified Paths: -------------- trunk/fb-contrib/build.xml Modified: trunk/fb-contrib/build.xml =================================================================== --- trunk/fb-contrib/build.xml 2006-12-21 09:10:40 UTC (rev 745) +++ trunk/fb-contrib/build.xml 2006-12-21 09:12:31 UTC (rev 746) @@ -20,7 +20,7 @@ <property name="javac.deprecation" value="on"/> <property name="javac.debug" value="on"/> - <property name="fb-contrib.version" value="3.0.2"/> + <property name="fb-contrib.version" value="3.1.0"/> <target name="clean" description="removes all generated collateral"> <delete dir="${classes.dir}"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2006-12-21 09:10:41
|
Revision: 745 http://svn.sourceforge.net/fb-contrib/?rev=745&view=rev Author: dbrosius Date: 2006-12-21 01:10:40 -0800 (Thu, 21 Dec 2006) Log Message: ----------- report all calls to possibly overridable methods that are chained from a constructor. Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PartiallyConstructedObjectAccess.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PartiallyConstructedObjectAccess.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PartiallyConstructedObjectAccess.java 2006-12-21 07:47:41 UTC (rev 744) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/PartiallyConstructedObjectAccess.java 2006-12-21 09:10:40 UTC (rev 745) @@ -18,6 +18,13 @@ */ package com.mebigfatguy.fbcontrib.detect; +import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Set; + import org.apache.bcel.Constants; import org.apache.bcel.classfile.Code; import org.apache.bcel.classfile.JavaClass; @@ -28,6 +35,7 @@ import edu.umd.cs.findbugs.BugReporter; import edu.umd.cs.findbugs.BytecodeScanningDetector; import edu.umd.cs.findbugs.OpcodeStack; +import edu.umd.cs.findbugs.SourceLineAnnotation; import edu.umd.cs.findbugs.ba.ClassContext; /** @@ -39,7 +47,9 @@ { private BugReporter bugReporter; private OpcodeStack stack; + private Map<Method, Map<Method, SourceLineAnnotation>> methodToCalledMethods; private boolean reportedCtor; + private boolean isCtor; /** * constructs a PCOA detector given the reporter to report bugs on @@ -49,25 +59,45 @@ this.bugReporter = bugReporter; } + /** + * implements the visitor to set up the stack and methodToCalledmethods map + * reports calls to public non final methods from methods called from constructors. + * + * @param classContext the context object of the currently parsed class + */ @Override public void visitClassContext(final ClassContext classContext) { try { JavaClass cls = classContext.getJavaClass(); if ((cls.getAccessFlags() & Constants.ACC_FINAL) == 0) { stack = new OpcodeStack(); + methodToCalledMethods = new HashMap<Method, Map<Method, SourceLineAnnotation>>(); super.visitClassContext(classContext); + + if (methodToCalledMethods.size() > 0) + reportChainedMethods(); } } finally { stack = null; + methodToCalledMethods = null; } } @Override public void visitCode(final Code obj) { stack.resetForMethodEntry(this); - reportedCtor = false; - if ("<init>".equals(getMethodName())) + String methodName = getMethodName(); + isCtor = "<init>".equals(methodName); + + if (!"<clinit>".equals(methodName)) { + Method m = getMethod(); + methodToCalledMethods.put(m, new HashMap<Method, SourceLineAnnotation>()); + reportedCtor = false; + super.visitCode(obj); + if (reportedCtor || (methodToCalledMethods.get(m).size() == 0)) + methodToCalledMethods.remove(getMethod()); + } } @Override @@ -78,7 +108,7 @@ try { stack.mergeJumps(this); - if ((seen == INVOKEVIRTUAL) || (seen == INVOKEINTERFACE)) { + if ((seen == INVOKEVIRTUAL) || (seen == INVOKEINTERFACE) || (seen == INVOKESPECIAL)) { int parmCount = Type.getArgumentTypes(getSigConstantOperand()).length; if (stack.getStackDepth() > parmCount) { OpcodeStack.Item itm = stack.getStackItem(parmCount); @@ -88,11 +118,18 @@ Method m = findMethod(cls, getNameConstantOperand(), getSigConstantOperand()); if (m != null) { if ((m.getAccessFlags() & Constants.ACC_FINAL) == 0) { - bugReporter.reportBug( new BugInstance(this, "PCOA_PARTIALLY_CONSTRUCTED_OBJECT_ACCESS", NORMAL_PRIORITY) - .addClass(this) - .addMethod(this) - .addSourceLine(this, getPC())); - reportedCtor = true; + if (isCtor && (seen != INVOKESPECIAL)) { + bugReporter.reportBug( new BugInstance(this, "PCOA_PARTIALLY_CONSTRUCTED_OBJECT_ACCESS", NORMAL_PRIORITY) + .addClass(this) + .addMethod(this) + .addSourceLine(this, getPC())); + reportedCtor = true; + } else { + if (!"<init>".equals(m.getName())) { + Map<Method, SourceLineAnnotation> calledMethods = methodToCalledMethods.get(getMethod()); + calledMethods.put(m, SourceLineAnnotation.fromVisitedInstruction(this)); + } + } } } } @@ -116,4 +153,51 @@ return null; } + + private void reportChainedMethods() { + Set<Method> checkedMethods = new HashSet<Method>(); + + JavaClass cls = getClassContext().getJavaClass(); + for (Map.Entry<Method, Map<Method, SourceLineAnnotation>> entry : methodToCalledMethods.entrySet()) { + Method m = entry.getKey(); + if ("<init>".equals(m.getName())) { + checkedMethods.clear(); + List<SourceLineAnnotation> slas = foundPrivateInChain(m, checkedMethods); + if (slas != null) { + BugInstance bi = new BugInstance(this, "PCOA_PARTIALLY_CONSTRUCTED_OBJECT_ACCESS", LOW_PRIORITY) + .addClass(cls) + .addMethod(cls, m); + for (SourceLineAnnotation sla : slas) + bi.addSourceLine(sla); + bugReporter.reportBug(bi); + } + } + } + } + + private List<SourceLineAnnotation> foundPrivateInChain(Method m, Set<Method> checkedMethods) { + Map<Method, SourceLineAnnotation> calledMethods = methodToCalledMethods.get(m); + if (calledMethods != null) { + for (Map.Entry<Method, SourceLineAnnotation> entry : calledMethods.entrySet()) { + Method cm = entry.getKey(); + if (checkedMethods.contains(cm)) + continue; + + if (!cm.isPrivate() && (cm.getAccessFlags() & Constants.ACC_FINAL) == 0) { + List<SourceLineAnnotation> slas = new LinkedList<SourceLineAnnotation>(); + slas.add(entry.getValue()); + return slas; + } + + checkedMethods.add(cm); + List<SourceLineAnnotation> slas = foundPrivateInChain(cm, checkedMethods); + if (slas != null) { + slas.add(0, entry.getValue()); + return slas; + } + } + } + + return null; + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2006-12-21 07:47:49
|
Revision: 744 http://svn.sourceforge.net/fb-contrib/?rev=744&view=rev Author: dbrosius Date: 2006-12-20 23:47:41 -0800 (Wed, 20 Dec 2006) Log Message: ----------- add harder case Modified Paths: -------------- trunk/fb-contrib/samples/PCOA_Sample.java Modified: trunk/fb-contrib/samples/PCOA_Sample.java =================================================================== --- trunk/fb-contrib/samples/PCOA_Sample.java 2006-12-19 21:14:36 UTC (rev 743) +++ trunk/fb-contrib/samples/PCOA_Sample.java 2006-12-21 07:47:41 UTC (rev 744) @@ -3,28 +3,52 @@ public class PCOA_Sample { - public PCOA_Sample() { + public PCOA_Sample() + { overridableMethod(); } - public PCOA_Sample(int ok) { + public PCOA_Sample(int ok) + { nonOverridableMethod(); } - public void overridableMethod() { - + public PCOA_Sample(String ok) + { + privateNonFinalMethod(); } - public final void nonOverridableMethod() { + public PCOA_Sample(long privateCallsOverridable) + { + privateCallsOverridable(); } + + public void overridableMethod() + { + } + + private void privateNonFinalMethod() + { + } + + public final void nonOverridableMethod() + { + } + + private void privateCallsOverridable() + { + overridableMethod(); + } final static class FinalClass { - public FinalClass() { + public FinalClass() + { aMethod(); } - public void aMethod() { + public void aMethod() + { } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2006-12-19 21:14:52
|
Revision: 743 http://svn.sourceforge.net/fb-contrib/?rev=743&view=rev Author: dbrosius Date: 2006-12-19 13:14:36 -0800 (Tue, 19 Dec 2006) Log Message: ----------- guard against odd npes Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java 2006-12-19 13:41:48 UTC (rev 742) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java 2006-12-19 21:14:36 UTC (rev 743) @@ -178,7 +178,8 @@ int reg = RegisterUtils.getAStoreReg(this, seen); try { - if (itm.getJavaClass().implementationOf(iteratorClass)) { + JavaClass cls = itm.getJavaClass(); + if ((cls != null) && cls.implementationOf(iteratorClass)) { groupToIterator.put(id, Integer14.valueOf(reg)); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2006-12-19 13:42:01
|
Revision: 742 http://svn.sourceforge.net/fb-contrib/?rev=742&view=rev Author: dbrosius Date: 2006-12-19 05:41:48 -0800 (Tue, 19 Dec 2006) Log Message: ----------- Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java 2006-12-19 08:25:31 UTC (rev 741) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java 2006-12-19 13:41:48 UTC (rev 742) @@ -30,6 +30,7 @@ import org.apache.bcel.classfile.CodeException; import org.apache.bcel.classfile.Method; +import com.mebigfatguy.fbcontrib.utils.Integer14; import com.mebigfatguy.fbcontrib.utils.RegisterUtils; import edu.umd.cs.findbugs.BugInstance; @@ -142,7 +143,7 @@ int reg = RegisterUtils.getStoreReg(this, seen); Integer iReg = Integer.valueOf(reg); int pc = getPC(); - if (catchHandlers.contains(pc)) + if (catchHandlers.contains(Integer14.valueOf(pc))) ignoreRegs.add(iReg); if (!ignoreRegs.contains(iReg)) { ScopeBlock sb = findScopeBlock(rootScopeBlock, pc); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |