[jsword-svn] r1171 - in trunk: biblemapper/src/main/java/org/crosswire/biblemapper/swing jsword-limbo/src/historic/java/org/crosswire/jsword/view/cli jsword-limbo/src/main/java/org/crosswire/bibledesktop/journal jsword-limbo/src/main/java/org/crosswire/common/net jsword-limbo/src/main/java/org/crosswire/common/xml jsword-limbo/src/main/java/org/crosswire/jsword/book/raw jsword-limbo/src/main/java/org/crosswire/jsword/book/remote jsword-limbo/src/main/java/org/crosswire/jsword/book/search/parse jsword-support/tools/pmd jsword-sword/src/main/java/org/crosswire/sword/mgr jsword-sword/src/main/java/org/crosswire/sword/web jsword-sword/src/test/java/org/crosswire/modedit

dmsmith at www.crosswire.org dmsmith at www.crosswire.org
Thu Oct 19 14:52:06 MST 2006


Author: dmsmith
Date: 2006-10-19 14:51:15 -0700 (Thu, 19 Oct 2006)
New Revision: 1171

Modified:
   trunk/biblemapper/src/main/java/org/crosswire/biblemapper/swing/CliMapper.java
   trunk/biblemapper/src/main/java/org/crosswire/biblemapper/swing/ExtensionFileFilter.java
   trunk/biblemapper/src/main/java/org/crosswire/biblemapper/swing/Mapper.java
   trunk/jsword-limbo/src/historic/java/org/crosswire/jsword/view/cli/BSFGui.java
   trunk/jsword-limbo/src/historic/java/org/crosswire/jsword/view/cli/Main.java
   trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/journal/BlogClientFrame.java
   trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/journal/BlogClientPanel.java
   trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/journal/BlogEntriesTableModel.java
   trunk/jsword-limbo/src/main/java/org/crosswire/common/net/WebPage.java
   trunk/jsword-limbo/src/main/java/org/crosswire/common/xml/OldXMLUtil.java
   trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/raw/InstsDisk.java
   trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/remote/HttpRemoter.java
   trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/search/parse/IndexSearcher.java
   trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/search/parse/PassageLeftParamWord.java
   trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/search/parse/PhraseParamWord.java
   trunk/jsword-support/tools/pmd/ruleset.xml
   trunk/jsword-sword/src/main/java/org/crosswire/sword/mgr/FileMgr.java
   trunk/jsword-sword/src/main/java/org/crosswire/sword/mgr/SWConfig.java
   trunk/jsword-sword/src/main/java/org/crosswire/sword/mgr/SWMgr.java
   trunk/jsword-sword/src/main/java/org/crosswire/sword/web/PackageMod.java
   trunk/jsword-sword/src/test/java/org/crosswire/modedit/MainFrame.java
   trunk/jsword-sword/src/test/java/org/crosswire/modedit/ModEdit.java
Log:
cleanup of issues identified by pmd

Modified: trunk/biblemapper/src/main/java/org/crosswire/biblemapper/swing/CliMapper.java
===================================================================
--- trunk/biblemapper/src/main/java/org/crosswire/biblemapper/swing/CliMapper.java	2006-10-19 21:49:36 UTC (rev 1170)
+++ trunk/biblemapper/src/main/java/org/crosswire/biblemapper/swing/CliMapper.java	2006-10-19 21:51:15 UTC (rev 1171)
@@ -157,7 +157,7 @@
         }
         catch (Exception ex)
         {
-            ex.printStackTrace();
+            ex.printStackTrace(System.err);
         }
     }
 

Modified: trunk/biblemapper/src/main/java/org/crosswire/biblemapper/swing/ExtensionFileFilter.java
===================================================================
--- trunk/biblemapper/src/main/java/org/crosswire/biblemapper/swing/ExtensionFileFilter.java	2006-10-19 21:49:36 UTC (rev 1170)
+++ trunk/biblemapper/src/main/java/org/crosswire/biblemapper/swing/ExtensionFileFilter.java	2006-10-19 21:51:15 UTC (rev 1171)
@@ -101,7 +101,7 @@
             buff.append(extensions[i]);
         }
 
-        buff.append(")"); //$NON-NLS-1$
+        buff.append(')');
 
         return buff.toString();
     }

Modified: trunk/biblemapper/src/main/java/org/crosswire/biblemapper/swing/Mapper.java
===================================================================
--- trunk/biblemapper/src/main/java/org/crosswire/biblemapper/swing/Mapper.java	2006-10-19 21:49:36 UTC (rev 1170)
+++ trunk/biblemapper/src/main/java/org/crosswire/biblemapper/swing/Mapper.java	2006-10-19 21:51:15 UTC (rev 1171)
@@ -933,7 +933,6 @@
         }
         catch (Exception ex)
         {
-            ex.printStackTrace();
             Reporter.informUser(this, ex);
         }
     }

Modified: trunk/jsword-limbo/src/historic/java/org/crosswire/jsword/view/cli/BSFGui.java
===================================================================
--- trunk/jsword-limbo/src/historic/java/org/crosswire/jsword/view/cli/BSFGui.java	2006-10-19 21:49:36 UTC (rev 1170)
+++ trunk/jsword-limbo/src/historic/java/org/crosswire/jsword/view/cli/BSFGui.java	2006-10-19 21:51:15 UTC (rev 1171)
@@ -126,7 +126,7 @@
         }
         catch (Exception ex)
         {
-            ex.printStackTrace();
+            ex.printStackTrace(System.err);
             reply = ex;
         }
         finally

Modified: trunk/jsword-limbo/src/historic/java/org/crosswire/jsword/view/cli/Main.java
===================================================================
--- trunk/jsword-limbo/src/historic/java/org/crosswire/jsword/view/cli/Main.java	2006-10-19 21:49:36 UTC (rev 1170)
+++ trunk/jsword-limbo/src/historic/java/org/crosswire/jsword/view/cli/Main.java	2006-10-19 21:51:15 UTC (rev 1171)
@@ -111,7 +111,7 @@
      */
     private String handle(Throwable ex)
     {
-        ex.printStackTrace();
+        ex.printStackTrace(System.err);
 
         return ex.toString();
     }

Modified: trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/journal/BlogClientFrame.java
===================================================================
--- trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/journal/BlogClientFrame.java	2006-10-19 21:49:36 UTC (rev 1170)
+++ trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/journal/BlogClientFrame.java	2006-10-19 21:51:15 UTC (rev 1171)
@@ -277,7 +277,7 @@
                     curPanel = disconnectedPanel;
                     add(disconnectedPanel, java.awt.BorderLayout.CENTER);
                 }
-                ex.printStackTrace();
+                ex.printStackTrace(System.err);
             }
 
             ReflectionBus.broadcast(new ResizeJournalSignal());

Modified: trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/journal/BlogClientPanel.java
===================================================================
--- trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/journal/BlogClientPanel.java	2006-10-19 21:49:36 UTC (rev 1170)
+++ trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/journal/BlogClientPanel.java	2006-10-19 21:51:15 UTC (rev 1171)
@@ -74,7 +74,7 @@
         }
         catch (Exception e)
         {
-            e.printStackTrace();
+            e.printStackTrace(System.err);
         }
     }
 
@@ -144,7 +144,7 @@
         }
         catch (Exception e)
         {
-            e.printStackTrace();
+            e.printStackTrace(System.err);
         }
     }
 
@@ -159,7 +159,7 @@
         }
         catch (Throwable t)
         {
-            t.printStackTrace();
+            t.printStackTrace(System.err);
         }
     }
 
@@ -193,7 +193,7 @@
             }
             catch (Exception e)
             {
-                e.printStackTrace();
+                e.printStackTrace(System.err);
                 JOptionPane.showMessageDialog(window, Msg.DELETE_ERROR);
             }
         }
@@ -219,7 +219,7 @@
             }
             catch (Exception e)
             {
-                e.printStackTrace();
+                e.printStackTrace(System.err);
                 JOptionPane.showMessageDialog(window, Msg.UPLOAD_ERROR);
             }
         }
@@ -286,7 +286,7 @@
         catch (Exception e)
         {
             // TODO: indicate error to user
-            e.printStackTrace();
+            e.printStackTrace(System.err);
         }
     }
 

Modified: trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/journal/BlogEntriesTableModel.java
===================================================================
--- trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/journal/BlogEntriesTableModel.java	2006-10-19 21:49:36 UTC (rev 1170)
+++ trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/journal/BlogEntriesTableModel.java	2006-10-19 21:51:15 UTC (rev 1171)
@@ -29,7 +29,7 @@
         }
         catch (Exception e)
         {
-            e.printStackTrace();
+            e.printStackTrace(System.err);
         }
     }
 

Modified: trunk/jsword-limbo/src/main/java/org/crosswire/common/net/WebPage.java
===================================================================
--- trunk/jsword-limbo/src/main/java/org/crosswire/common/net/WebPage.java	2006-10-19 21:49:36 UTC (rev 1170)
+++ trunk/jsword-limbo/src/main/java/org/crosswire/common/net/WebPage.java	2006-10-19 21:51:15 UTC (rev 1171)
@@ -82,7 +82,7 @@
         }
         catch (Throwable ex)
         {
-            ex.printStackTrace();
+            ex.printStackTrace(System.err);
             if (ex instanceof ThreadDeath) throw (ThreadDeath) ex;
             data = null;
         }

Modified: trunk/jsword-limbo/src/main/java/org/crosswire/common/xml/OldXMLUtil.java
===================================================================
--- trunk/jsword-limbo/src/main/java/org/crosswire/common/xml/OldXMLUtil.java	2006-10-19 21:49:36 UTC (rev 1170)
+++ trunk/jsword-limbo/src/main/java/org/crosswire/common/xml/OldXMLUtil.java	2006-10-19 21:51:15 UTC (rev 1171)
@@ -106,7 +106,7 @@
 
         case Node.ELEMENT_NODE:
             buff.append(DOT_PADDING.substring(0, depth*2));
-            buff.append("<"); //$NON-NLS-1$
+            buff.append('<');
             buff.append(node.getNodeName());
 
             // The attributes
@@ -119,7 +119,7 @@
                     buff.append(map.item(i).getNodeName());
                     buff.append("='"); //$NON-NLS-1$
                     buff.append(map.item(i).getNodeValue());
-                    buff.append("'"); //$NON-NLS-1$
+                    buff.append('\'');
                 }
             }
 
@@ -133,7 +133,7 @@
             }
             else
             {
-                buff.append(">"); //$NON-NLS-1$
+                buff.append('>');
                 buff.append(StringUtil.NEWLINE);
 
                 for (int i=0; i<list.getLength(); i++)
@@ -144,7 +144,7 @@
                 buff.append(DOT_PADDING.substring(0, depth*2));
                 buff.append("</"); //$NON-NLS-1$
                 buff.append(node.getNodeName());
-                buff.append(">"); //$NON-NLS-1$
+                buff.append('>');
                 buff.append(StringUtil.NEWLINE);
             }
             break;

Modified: trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/raw/InstsDisk.java
===================================================================
--- trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/raw/InstsDisk.java	2006-10-19 21:49:36 UTC (rev 1170)
+++ trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/raw/InstsDisk.java	2006-10-19 21:51:15 UTC (rev 1171)
@@ -60,7 +60,7 @@
         }
         catch (Exception ex)
         {
-            messages.append(""+ex); //$NON-NLS-1$
+            messages.append(ex.toString());
         }
     }
 

Modified: trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/remote/HttpRemoter.java
===================================================================
--- trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/remote/HttpRemoter.java	2006-10-19 21:49:36 UTC (rev 1170)
+++ trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/remote/HttpRemoter.java	2006-10-19 21:51:15 UTC (rev 1171)
@@ -110,9 +110,9 @@
                     String val = method.getParameter(param);
                     String b64 = URLEncoder.encode(val, "UTF-8"); //$NON-NLS-1$
 
-                    buffer.append("&"); //$NON-NLS-1$
+                    buffer.append('&');
                     buffer.append(key);
-                    buffer.append("="); //$NON-NLS-1$
+                    buffer.append('=');
                     buffer.append(b64);
                 }
             }

Modified: trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/search/parse/IndexSearcher.java
===================================================================
--- trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/search/parse/IndexSearcher.java	2006-10-19 21:49:36 UTC (rev 1170)
+++ trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/search/parse/IndexSearcher.java	2006-10-19 21:51:15 UTC (rev 1171)
@@ -133,7 +133,7 @@
             }
             catch (ClassCastException ex)
             {
-                ex.printStackTrace();
+                ex.printStackTrace(System.err);
                 throw new BookException(Msg.ENGINE_SYNTAX, new Object[] { temp });
             }
         }

Modified: trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/search/parse/PassageLeftParamWord.java
===================================================================
--- trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/search/parse/PassageLeftParamWord.java	2006-10-19 21:49:36 UTC (rev 1170)
+++ trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/search/parse/PassageLeftParamWord.java	2006-10-19 21:51:15 UTC (rev 1171)
@@ -80,7 +80,7 @@
             }
 
             buff.append(word);
-            buff.append(" "); //$NON-NLS-1$
+            buff.append(' ');
         }
 
         try

Modified: trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/search/parse/PhraseParamWord.java
===================================================================
--- trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/search/parse/PhraseParamWord.java	2006-10-19 21:49:36 UTC (rev 1170)
+++ trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/search/parse/PhraseParamWord.java	2006-10-19 21:51:15 UTC (rev 1171)
@@ -73,7 +73,7 @@
             }
 
             buff.append(word);
-            buff.append(" "); //$NON-NLS-1$
+            buff.append(' ');
         }
 
         return bestMatch(engine, buff.toString());

Modified: trunk/jsword-support/tools/pmd/ruleset.xml
===================================================================
--- trunk/jsword-support/tools/pmd/ruleset.xml	2006-10-19 21:49:36 UTC (rev 1170)
+++ trunk/jsword-support/tools/pmd/ruleset.xml	2006-10-19 21:51:15 UTC (rev 1171)
@@ -23,7 +23,7 @@
   <rule ref="rulesets/basic.xml/BooleanInstantiation"/>
   <rule ref="rulesets/basic.xml/UnnecessaryFinalModifier"/>
   <rule ref="rulesets/basic.xml/CollapsibleIfStatements"/>
-  <rule ref="rulesets/basic.xml/UselessOverridingMethod"/>
+  <!-- <rule ref="rulesets/basic.xml/UselessOverridingMethod"/> buggy -->
   <rule ref="rulesets/basic.xml/ClassCastExceptionWithToArray"/>
   <rule ref="rulesets/basic.xml/AvoidDecimalLiteralsInBigDecimalConstructor"/>
   <rule ref="rulesets/basic.xml/UselessOperationOnImmutable"/>
@@ -32,9 +32,9 @@
   <!-- <rule ref="rulesets/basic.xml/AvoidThreadGroup"/> Used correctly in Desktop.java -->
   <rule ref="rulesets/basic.xml/BrokenNullCheck"/>
 
-  <!-- <rule ref="rulesets/naming.xml/ShortVariable"/> 646 reports -->
-  <!-- <rule ref="rulesets/naming.xml/LongVariable"/> 127 reports -->
-  <rule ref="rulesets/naming.xml/ShortMethodName"/>
+  <!-- <rule ref="rulesets/naming.xml/ShortVariable"/> 702 reports -->
+  <!-- <rule ref="rulesets/naming.xml/LongVariable"/> 145 reports -->
+  <!-- <rule ref="rulesets/naming.xml/ShortMethodName"/> 1 report History.go() -->
   <rule ref="rulesets/naming.xml/VariableNamingConventions"/>
   <rule ref="rulesets/naming.xml/MethodNamingConventions"/>
   <rule ref="rulesets/naming.xml/ClassNamingConventions"/>
@@ -44,8 +44,8 @@
   <rule ref="rulesets/naming.xml/SuspiciousHashcodeMethodName"/>
   <rule ref="rulesets/naming.xml/SuspiciousConstantFieldName"/>
   <rule ref="rulesets/naming.xml/SuspiciousEqualsMethodName"/>
-  <rule ref="rulesets/naming.xml/AvoidFieldNameMatchingTypeName"/>
-  <rule ref="rulesets/naming.xml/AvoidFieldNameMatchingMethodName"/>
+  <!-- <rule ref="rulesets/naming.xml/AvoidFieldNameMatchingTypeName"/> implemented poorly -->
+  <!-- <rule ref="rulesets/naming.xml/AvoidFieldNameMatchingMethodName"/> implemented poorly -->
   <rule ref="rulesets/naming.xml/AvoidNonConstructorMethodsWithClassName"/>
   <rule ref="rulesets/naming.xml/NoPackage"/>
   <rule ref="rulesets/naming.xml/PackageCase"/>
@@ -60,10 +60,10 @@
   <rule ref="rulesets/design.xml/SimplifyBooleanReturns"/>
   <rule ref="rulesets/design.xml/SimplifyBooleanExpressions"/>
   <rule ref="rulesets/design.xml/SwitchStmtsShouldHaveDefault"/>
-  <!-- <rule ref="rulesets/design.xml/AvoidDeeplyNestedIfStmts"/> 8 reports -->
+  <!-- <rule ref="rulesets/design.xml/AvoidDeeplyNestedIfStmts"/> 14 reports -->
   <rule ref="rulesets/design.xml/AvoidReassigningParameters"/>
   <rule ref="rulesets/design.xml/SwitchDensity"/>
-  <rule ref="rulesets/design.xml/ConstructorCallsOverridableMethod"/>
+  <!-- <rule ref="rulesets/design.xml/ConstructorCallsOverridableMethod"/> very good idea, buggy implementation -->
   <rule ref="rulesets/design.xml/AccessorClassGeneration"/>
   <rule ref="rulesets/design.xml/FinalFieldCouldBeStatic"/>
   <rule ref="rulesets/design.xml/CloseResource"/>
@@ -76,27 +76,27 @@
   <!-- <rule ref="rulesets/design.xml/ConfusingTernary"/> allow (test ? 1 : 2) -->
   <rule ref="rulesets/design.xml/InstantiationToGetClass"/>
   <rule ref="rulesets/design.xml/IdempotentOperations"/>
-  <rule ref="rulesets/design.xml/SimpleDateFormatNeedsLocale"/>
-  <!-- <rule ref="rulesets/design.xml/ImmutableField"/> 236 reports. -->
+  <!-- <rule ref="rulesets/design.xml/SimpleDateFormatNeedsLocale"/> should use -->
+  <!-- <rule ref="rulesets/design.xml/ImmutableField"/> 230 reports. -->
   <rule ref="rulesets/design.xml/UseLocaleWithCaseConversions"/>
   <rule ref="rulesets/design.xml/AvoidProtectedFieldInFinalClass"/>
   <rule ref="rulesets/design.xml/AssignmentToNonFinalStatic"/>
-  <!-- <rule ref="rulesets/design.xml/MissingStaticMethodInNonInstantiatableClass"/> 29 reports -->
-  <!-- <rule ref="rulesets/design.xml/AvoidSynchronizedAtMethodLevel"/> 106 reports -->
+  <rule ref="rulesets/design.xml/MissingStaticMethodInNonInstantiatableClass"/>
+  <!-- <rule ref="rulesets/design.xml/AvoidSynchronizedAtMethodLevel"/> 109 reports -->
   <rule ref="rulesets/design.xml/MissingBreakInSwitch"/>
   <rule ref="rulesets/design.xml/UseNotifyAllInsteadOfNotify"/>
   <rule ref="rulesets/design.xml/AvoidInstanceofChecksInCatchClause"/>
   <rule ref="rulesets/design.xml/AbstractClassWithoutAbstractMethod"/>
   <rule ref="rulesets/design.xml/SimplifyConditional"/>
-  <rule ref="rulesets/design.xml/CompareObjectsWithEquals"/>
+  <!-- <rule ref="rulesets/design.xml/CompareObjectsWithEquals"/> use on occassion but we do need object equals, too -->
   <rule ref="rulesets/design.xml/PositionLiteralsFirstInComparisons"/>
   <rule ref="rulesets/design.xml/UnnecessaryLocalBeforeReturn"/>
   <rule ref="rulesets/design.xml/NonThreadSafeSingleton"/>
-  <!-- <rule ref="rulesets/design.xml/UncommentedEmptyMethod"/> 53 reports -->
-  <!-- <rule ref="rulesets/design.xml/UncommentedEmptyConstructor"/> 188 reports -->
+  <!-- <rule ref="rulesets/design.xml/UncommentedEmptyMethod"/> 74 reports -->
+  <!-- <rule ref="rulesets/design.xml/UncommentedEmptyConstructor"/> 14 reports -->
   <rule ref="rulesets/design.xml/AvoidConstantsInterface"/>
-  <rule ref="rulesets/design.xml/UnsynchronizedStaticDateFormatter"/>
-  <rule ref="rulesets/design.xml/PreserveStackTrace"/>
+  <!-- <rule ref="rulesets/design.xml/UnsynchronizedStaticDateFormatter"/> 5 reports -->
+  <!-- <rule ref="rulesets/design.xml/PreserveStackTrace"/> 7 reports -->
 
   <rule ref="rulesets/imports.xml/DuplicateImports"/>
   <rule ref="rulesets/imports.xml/DontImportJavaLang"/>
@@ -114,29 +114,36 @@
   <rule ref="rulesets/junit.xml/UseAssertSameInsteadOfAssertTrue"/>
 -->
 
-  <rule ref="rulesets/strings.xml/AvoidDuplicateLiterals"/>
+  <!-- <rule ref="rulesets/strings.xml/AvoidDuplicateLiterals"/> 5 reports -->
   <rule ref="rulesets/strings.xml/StringInstantiation"/>
   <rule ref="rulesets/strings.xml/StringToString"/>
   <rule ref="rulesets/strings.xml/InefficientStringBuffering"/>
   <rule ref="rulesets/strings.xml/UnnecessaryCaseChange"/>
   <rule ref="rulesets/strings.xml/UseStringBufferLength"/>
+  <rule ref="rulesets/strings.xml/AppendCharacterWithChar"/>
+  <!-- <rule ref="rulesets/strings.xml/ConsecutiveLiteralAppends"/> 1 report -->
+  <rule ref="rulesets/strings.xml/UseIndexOfChar"/>
+  <!-- <rule ref="rulesets/strings.xml/InefficientEmptyStringCheck"/> 1 report, dumb -->
+  <!-- <rule ref="rulesets/strings.xml/InsufficientStringBufferDeclaration"/> 3 reports -->
+  <rule ref="rulesets/strings.xml/UselessStringValueOf"/>  
 
+
   <rule ref="rulesets/braces.xml/IfStmtsMustUseBraces"/>
   <rule ref="rulesets/braces.xml/WhileLoopsMustUseBraces"/>
   <rule ref="rulesets/braces.xml/IfElseStmtsMustUseBraces"/>
   <rule ref="rulesets/braces.xml/ForLoopsMustUseBraces"/>
 
-  <!-- <rule ref="rulesets/codesize.xml/ExcessiveMethodLength"/> 8 reports. -->
-  <rule ref="rulesets/codesize.xml/ExcessiveParameterList"/>
+  <!-- <rule ref="rulesets/codesize.xml/ExcessiveMethodLength"/> 9 reports. -->
+  <!-- <rule ref="rulesets/codesize.xml/ExcessiveParameterList"/> better handled by CheckStyle -->
   <!-- <rule ref="rulesets/codesize.xml/ExcessiveClassLength"/> 5 reports. -->
-  <!-- <rule ref="rulesets/codesize.xml/CyclomaticComplexity"/> 41 reports, maybe check comments? -->
-  <rule ref="rulesets/codesize.xml/ExcessivePublicCount"/>
-  <rule ref="rulesets/codesize.xml/TooManyFields"/>
+  <!-- <rule ref="rulesets/codesize.xml/CyclomaticComplexity"/> 67 reports, maybe check comments? -->
+  <!-- <rule ref="rulesets/codesize.xml/ExcessivePublicCount"/> better handled by CheckStyle -->
+  <!-- <rule ref="rulesets/codesize.xml/TooManyFields"/> better handled by CheckStyle -->
 
-  <rule ref="rulesets/j2ee.xml/UseProperClassLoader"/> <!-- new 3.8 -->
+  <rule ref="rulesets/j2ee.xml/UseProperClassLoader"/>
 
   <!-- <rule ref="rulesets/javabeans.xml/BeanMembersShouldSerialize"/> 585 reports -->
-  <rule ref="rulesets/javabeans.xml/MissingSerialVersionUID"/>
+  <!-- <rule ref="rulesets/javabeans.xml/MissingSerialVersionUID"/> Not very good. -->
 
   <rule ref="rulesets/finalizers.xml/EmptyFinalizer"/>
   <rule ref="rulesets/finalizers.xml/FinalizeOnlyCallsSuperFinalize"/>
@@ -146,35 +153,24 @@
   <rule ref="rulesets/finalizers.xml/AvoidCallingFinalize"/>
 
   <rule ref="rulesets/clone.xml/ProperCloneImplementation"/>
-  <rule ref="rulesets/clone.xml/CloneThrowsCloneNotSupportedException"/>
-  <rule ref="rulesets/clone.xml/CloneMethodMustImplementCloneable"/>
+  <!-- <rule ref="rulesets/clone.xml/CloneThrowsCloneNotSupportedException"/> Not very good. -->
+  <!-- <rule ref="rulesets/clone.xml/CloneMethodMustImplementCloneable"/> Not very good. -->
 
+  <!-- Better handled by other tools
   <rule ref="rulesets/coupling.xml/CouplingBetweenObjects"/>
   <rule ref="rulesets/coupling.xml/ExcessiveImports"/>
   <rule ref="rulesets/coupling.xml/LooseCoupling"/>
+  -->
 
   <rule ref="rulesets/strictexception.xml/AvoidCatchingThrowable"/>
   <rule ref="rulesets/strictexception.xml/SignatureDeclareThrowsException"/>
   <rule ref="rulesets/strictexception.xml/ExceptionAsFlowControl"/>
   <rule ref="rulesets/strictexception.xml/AvoidCatchingNPE"/>
-  <rule ref="rulesets/strictexception.xml/AvoidThrowingRawExceptionTypes"/>
+  <!-- <rule ref="rulesets/strictexception.xml/AvoidThrowingRawExceptionTypes"/> good idea, bad implementation -->
   <rule ref="rulesets/strictexception.xml/AvoidThrowingNullPointerException"/>
-  <rule ref="rulesets/strictexception.xml/AvoidRethrowingException"/> <!-- new 3.8 -->
+  <!-- <rule ref="rulesets/strictexception.xml/AvoidRethrowingException"/> new 3.8 -->
 
-  <rule ref="rulesets/strings.xml/AvoidDuplicateLiterals"/> <!-- new 3.8 -->
-  <rule ref="rulesets/strings.xml/StringInstantiation"/> <!-- new 3.8 -->
-  <rule ref="rulesets/strings.xml/StringToString"/> <!-- new 3.8 -->
-  <rule ref="rulesets/strings.xml/InefficientStringBuffering"/> <!-- new 3.8 -->
-  <rule ref="rulesets/strings.xml/UnnecessaryCaseChange"/> <!-- new 3.8 -->
-  <rule ref="rulesets/strings.xml/UseStringBufferLength"/> <!-- new 3.8 -->
-  <rule ref="rulesets/strings.xml/AppendCharacterWithChar"/> <!-- new 3.8 -->
-  <rule ref="rulesets/strings.xml/ConsecutiveLiteralAppends"/> <!-- new 3.8 -->
-  <rule ref="rulesets/strings.xml/UseIndexOfChar"/> <!-- new 3.8 -->
-  <rule ref="rulesets/strings.xml/InefficientEmptyStringCheck"/> <!-- new 3.8 -->
-  <rule ref="rulesets/strings.xml/InsufficientStringBufferDeclaration"/> <!-- new 3.8 -->
-  <rule ref="rulesets/strings.xml/UselessStringValueOf"/> <!-- new 3.8 -->  
-
-  <rule ref="rulesets/controversial.xml/UnnecessaryConstructor"/>
+  <!-- <rule ref="rulesets/controversial.xml/UnnecessaryConstructor"/> -->
   <!-- <rule ref="rulesets/controversial.xml/NullAssignment"/> 61 reports -->
   <!-- <rule ref="rulesets/controversial.xml/OnlyOneReturn"/> 506 reports -->
   <rule ref="rulesets/controversial.xml/UnusedModifier"/>
@@ -186,7 +182,7 @@
   <rule ref="rulesets/controversial.xml/UnnecessaryParentheses"/>
   <!-- <rule ref="rulesets/controversial.xml/SingularField"/> 65 reports -->
   <!-- <rule ref="rulesets/controversial.xml/DefaultPackage"/> 355 reports -->
-  <rule ref="rulesets/controversial.xml/BooleanInversion"/> <!-- new 3.8 -->
+  <!-- <rule ref="rulesets/controversial.xml/BooleanInversion"/> -->
 
   <!-- <rule ref="rulesets/logging-java.xml/MoreThanOneLogger"/> Not written very well. -->
   <!-- <rule ref="rulesets/logging-java.xml/LoggerIsNotStaticFinal"/> Not very smart. -->
@@ -196,15 +192,15 @@
   <rule ref="rulesets/logging-jakarta-commons.xml/UseCorrectExceptionLogging"/>
   <rule ref="rulesets/logging-jakarta-commons.xml/ProperLogger"/>
   
-  <!-- <rule ref="rulesets/optimizations.xml/LocalVariableCouldBeFinal"/> 21117 reports! -->
-  <!-- <rule ref="rulesets/optimizations.xml/MethodArgumentCouldBeFinal"/> 1908 reports! -->
-  <!-- <rule ref="rulesets/optimizations.xml/AvoidInstantiatingObjectsInLoops"/> 70 reports. -->
-  <rule ref="rulesets/optimizations.xml/UseArrayListInsteadOfVector"/> <!-- new 3.8 -->
-  <rule ref="rulesets/optimizations.xml/SimplifyStartsWith"/> <!-- new 3.8 -->
-  <rule ref="rulesets/optimizations.xml/UseStringBufferForStringAppends"/> <!-- new 3.8 -->
-  <rule ref="rulesets/optimizations.xml/UseArraysAsList"/> <!-- new 3.8 -->
-  <rule ref="rulesets/optimizations.xml/AvoidArrayLoops"/> <!-- new 3.8 -->
-  <rule ref="rulesets/optimizations.xml/UnnecessaryWrapperObjectCreation"/> <!-- new 3.8 -->
+  <!-- <rule ref="rulesets/optimizations.xml/LocalVariableCouldBeFinal"/> 2267 reports! -->
+  <!-- <rule ref="rulesets/optimizations.xml/MethodArgumentCouldBeFinal"/> 2156 reports! -->
+  <!-- <rule ref="rulesets/optimizations.xml/AvoidInstantiatingObjectsInLoops"/> 75 reports. -->
+  <rule ref="rulesets/optimizations.xml/UseArrayListInsteadOfVector"/>
+  <rule ref="rulesets/optimizations.xml/SimplifyStartsWith"/>
+  <rule ref="rulesets/optimizations.xml/UseStringBufferForStringAppends"/>
+  <rule ref="rulesets/optimizations.xml/UseArraysAsList"/>
+  <rule ref="rulesets/optimizations.xml/AvoidArrayLoops"/>
+  <!-- <rule ref="rulesets/optimizations.xml/UnnecessaryWrapperObjectCreation"/> 1 Java 1.5 report -->
   
   <rule ref="rulesets/sunsecure.xml/MethodReturnsInternalArray"/>
   <rule ref="rulesets/sunsecure.xml/ArrayIsStoredDirectly"/>

Modified: trunk/jsword-sword/src/main/java/org/crosswire/sword/mgr/FileMgr.java
===================================================================
--- trunk/jsword-sword/src/main/java/org/crosswire/sword/mgr/FileMgr.java	2006-10-19 21:49:36 UTC (rev 1170)
+++ trunk/jsword-sword/src/main/java/org/crosswire/sword/mgr/FileMgr.java	2006-10-19 21:51:15 UTC (rev 1171)
@@ -108,7 +108,7 @@
 				retVal = istream.available();
 			}
 			catch (Exception e) {
-				e.printStackTrace();
+				e.printStackTrace(System.err);
 			}
 			return retVal;
 		}

Modified: trunk/jsword-sword/src/main/java/org/crosswire/sword/mgr/SWConfig.java
===================================================================
--- trunk/jsword-sword/src/main/java/org/crosswire/sword/mgr/SWConfig.java	2006-10-19 21:49:36 UTC (rev 1170)
+++ trunk/jsword-sword/src/main/java/org/crosswire/sword/mgr/SWConfig.java	2006-10-19 21:51:15 UTC (rev 1171)
@@ -142,7 +142,7 @@
             }
         }catch(Exception ex) {
             System.err.println("Error: " + ex.getMessage() ); //$NON-NLS-1$
-            ex.printStackTrace();
+            ex.printStackTrace(System.err);
         }
 
     }

Modified: trunk/jsword-sword/src/main/java/org/crosswire/sword/mgr/SWMgr.java
===================================================================
--- trunk/jsword-sword/src/main/java/org/crosswire/sword/mgr/SWMgr.java	2006-10-19 21:49:36 UTC (rev 1170)
+++ trunk/jsword-sword/src/main/java/org/crosswire/sword/mgr/SWMgr.java	2006-10-19 21:51:15 UTC (rev 1171)
@@ -264,7 +264,7 @@
                     config = myconfig = new SWConfig(newmodfile);
                 }
             }
-            catch (java.io.IOException e) { e.printStackTrace(); }
+            catch (java.io.IOException e) { e.printStackTrace(System.err); }
         }
     }
 
@@ -281,7 +281,7 @@
                 }
             }
         }
-        catch (java.io.IOException e) { e.printStackTrace(); }
+        catch (java.io.IOException e) { e.printStackTrace(System.err); }
         if (config != null) {
 /*
         SectionMap::iterator Sectloop, Sectend;

Modified: trunk/jsword-sword/src/main/java/org/crosswire/sword/web/PackageMod.java
===================================================================
--- trunk/jsword-sword/src/main/java/org/crosswire/sword/web/PackageMod.java	2006-10-19 21:49:36 UTC (rev 1170)
+++ trunk/jsword-sword/src/main/java/org/crosswire/sword/web/PackageMod.java	2006-10-19 21:51:15 UTC (rev 1171)
@@ -39,7 +39,7 @@
             }
             fin.close();
         }
-        catch (Exception e) { e.printStackTrace(); }
+        catch (Exception e) { e.printStackTrace(System.err); }
     }
 
     public static long getLastModFile(SWMgr mgr, String sourceDir, String modName) {
@@ -121,7 +121,7 @@
 //				}
                 }
         }
-        catch (Exception e1) { e1.printStackTrace(); }
+        catch (Exception e1) { e1.printStackTrace(System.err); }
         return lastModFile;
     }
 
@@ -200,6 +200,6 @@
                 zstream.close();
                 }
         }
-        catch (Exception e1) { e1.printStackTrace(); }
+        catch (Exception e1) { e1.printStackTrace(System.err); }
     }
 }

Modified: trunk/jsword-sword/src/test/java/org/crosswire/modedit/MainFrame.java
===================================================================
--- trunk/jsword-sword/src/test/java/org/crosswire/modedit/MainFrame.java	2006-10-19 21:49:36 UTC (rev 1170)
+++ trunk/jsword-sword/src/test/java/org/crosswire/modedit/MainFrame.java	2006-10-19 21:51:15 UTC (rev 1171)
@@ -82,7 +82,7 @@
             jbInit();
         }
         catch(Exception e) {
-            e.printStackTrace();
+            e.printStackTrace(System.err);
         }
     }
     /**Component initialization*/
@@ -225,7 +225,7 @@
             is.close();
             statusBar.setText("New Font Loaded."); //$NON-NLS-1$
         }
-        catch (Exception ex) { ex.printStackTrace(); }
+        catch (Exception ex) { ex.printStackTrace(System.err); }
 
     }
 
@@ -250,7 +250,7 @@
             jTextArea1.setText(newText);
             statusBar.setText(Integer.toString(newText.length())+" characters of content loaded."); //$NON-NLS-1$
         }
-        catch (Exception ex) { ex.printStackTrace(); }
+        catch (Exception ex) { ex.printStackTrace(System.err); }
 
     }
 
@@ -301,7 +301,7 @@
             try {
                 jTextArea1.write(new OutputStreamWriter(new FileOutputStream(outFile), "UTF-8")); //$NON-NLS-1$
             }
-            catch (Exception e1) { e1.printStackTrace(); }
+            catch (Exception e1) { e1.printStackTrace(System.err); }
         }
 
     }

Modified: trunk/jsword-sword/src/test/java/org/crosswire/modedit/ModEdit.java
===================================================================
--- trunk/jsword-sword/src/test/java/org/crosswire/modedit/ModEdit.java	2006-10-19 21:49:36 UTC (rev 1170)
+++ trunk/jsword-sword/src/test/java/org/crosswire/modedit/ModEdit.java	2006-10-19 21:51:15 UTC (rev 1171)
@@ -35,7 +35,7 @@
             UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
         }
         catch(Exception e) {
-            e.printStackTrace();
+            e.printStackTrace(System.err);
         }
         new ModEdit();
     }




More information about the jsword-svn mailing list