[jsword-svn] r1189 - in trunk: bibledesktop/src/main/java/org/crosswire/bibledesktop/book common/src/main/java/org/crosswire/common/xml jsword/src/main/java/org/crosswire/jsword/book/filter/gbf jsword/src/main/java/org/crosswire/jsword/book/filter/thml jsword/src/main/java/org/crosswire/jsword/book/sword

dmsmith at www.crosswire.org dmsmith at www.crosswire.org
Sat Nov 18 06:22:36 MST 2006


Author: dmsmith
Date: 2006-11-18 06:22:36 -0700 (Sat, 18 Nov 2006)
New Revision: 1189

Modified:
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleComboBoxModel.java
   trunk/common/src/main/java/org/crosswire/common/xml/XMLUtil.java
   trunk/jsword/src/main/java/org/crosswire/jsword/book/filter/gbf/GBFTagBuilders.java
   trunk/jsword/src/main/java/org/crosswire/jsword/book/filter/thml/THMLFilter.java
   trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/ConfigEntryTable.java
Log:
routine qa cleanup

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleComboBoxModel.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleComboBoxModel.java	2006-11-18 12:59:40 UTC (rev 1188)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleComboBoxModel.java	2006-11-18 13:22:36 UTC (rev 1189)
@@ -205,7 +205,6 @@
             int book = old.getBook();
             int verse = old.getVerse();
 
-            
             verse = Math.min(verse, BibleInfo.versesInChapter(book, chapter));
 
             Verse update = new Verse(book, chapter, verse);

Modified: trunk/common/src/main/java/org/crosswire/common/xml/XMLUtil.java
===================================================================
--- trunk/common/src/main/java/org/crosswire/common/xml/XMLUtil.java	2006-11-18 12:59:40 UTC (rev 1188)
+++ trunk/common/src/main/java/org/crosswire/common/xml/XMLUtil.java	2006-11-18 13:22:36 UTC (rev 1189)
@@ -345,8 +345,8 @@
     }
 
     // Map entities to their unicode equivalent
-    static Set goodEntities = new HashSet();
-    static Map badEntities = new HashMap();
+    private static Set goodEntities = new HashSet();
+    private static Map badEntities = new HashMap();
     static
     {
         // pre-defined XML entities
@@ -470,7 +470,7 @@
     private static Pattern validCharacterEntityPattern = Pattern.compile("^&#x?\\d{2,4};"); //$NON-NLS-1$
 
     /**
-     * Pattern that negates the allowable XML unicode characters in the range of \u0000-\uFFFF.
+     * Pattern that negates the allowable XML 4 byte unicode characters.
      * Valid are: #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
      */
     private static Pattern invalidCharacterPattern = Pattern.compile("[^\t\r\n\u0020-\uD7FF\uE000-\uFFFD]"); //$NON-NLS-1$

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/filter/gbf/GBFTagBuilders.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/filter/gbf/GBFTagBuilders.java	2006-11-18 12:59:40 UTC (rev 1188)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/filter/gbf/GBFTagBuilders.java	2006-11-18 13:22:36 UTC (rev 1189)
@@ -184,7 +184,7 @@
         */
        public Tag createTag(final String name)
        {
-           if (name.equals("CG")) //$NON-NLS-1$
+           if ("CG".equals(name)) //$NON-NLS-1$
            {
                return new TextTag(">"); //$NON-NLS-1$
            }

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/filter/thml/THMLFilter.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/filter/thml/THMLFilter.java	2006-11-18 12:59:40 UTC (rev 1188)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/filter/thml/THMLFilter.java	2006-11-18 13:22:36 UTC (rev 1189)
@@ -70,12 +70,13 @@
         {
             if (error instanceof SAXParseException)
             {
-                int colNumber = ((SAXParseException) error).getColumnNumber();
+                SAXParseException spe = (SAXParseException) error;
+                int colNumber = spe.getColumnNumber();
                 int start = Math.max(0, colNumber - 40);
                 int stop = Math.min(finalInput.length(), colNumber + 40);
                 int here = stop - start;
                 log.warn("Could not fix " + book.getInitials() + '(' + key.getName() + ") by " +   //$NON-NLS-1$ //$NON-NLS-2$
-                         errorMessage + ": Error here(" + colNumber + ',' + finalInput.length() +',' + here +"): " + finalInput.substring(start, stop)); //$NON-NLS-1$ //$NON-NLS-2$
+                         errorMessage + ": Error here(" + colNumber + ',' + finalInput.length() + ',' + here + "): " + finalInput.substring(start, stop)); //$NON-NLS-1$ //$NON-NLS-2$
             }
             else
             {

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/ConfigEntryTable.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/ConfigEntryTable.java	2006-11-18 12:59:40 UTC (rev 1188)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/ConfigEntryTable.java	2006-11-18 13:22:36 UTC (rev 1189)
@@ -581,7 +581,7 @@
     private boolean isLeftToRight(String lang)
     {
         // Java does not know that the following languages are right to left
-        if (lang.equals("fa") || lang.equals("syr"))  //$NON-NLS-1$ //$NON-NLS-2$
+        if ("fa".equals(lang) || "syr".equals(lang))  //$NON-NLS-1$ //$NON-NLS-2$
         {
             return false;
         }




More information about the jsword-svn mailing list