[Fb-contrib-commit] SF.net SVN: fb-contrib: [751] trunk/fb-contrib
Brought to you by:
dbrosius
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. |