[jsword-svn] r1890 - in trunk: bibledesktop/etc/eclipse bibledesktop/src/main/java/org/crosswire/bibledesktop/book bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop bibledesktop/src/main/java/org/crosswire/bibledesktop/display/basic bibledesktop/src/main/java/org/crosswire/bibledesktop/passage common common/src/main/java/org/crosswire/common/icu common/src/main/java/org/crosswire/common/options common/src/main/java/org/crosswire/common/progress common/src/main/java/org/crosswire/common/util common-swing/src/main/java/org/crosswire/common/progress/swing common-swing/src/main/java/org/crosswire/common/swing jsword/src/main/java/org/crosswire/jsword/book jsword/src/main/java/org/crosswire/jsword/book/sword jsword/src/main/java/org/crosswire/jsword/examples jsword/src/main/java/org/crosswire/jsword/index/search jsword/src/main/java/org/crosswire/jsword/passage jsword/src/test/java/org/crosswire/jsword/book jsword-support/tools/pmd

dmsmith at www.crosswire.org dmsmith at www.crosswire.org
Wed Jul 9 05:15:15 MST 2008


Author: dmsmith
Date: 2008-07-09 05:15:15 -0700 (Wed, 09 Jul 2008)
New Revision: 1890

Modified:
   trunk/bibledesktop/etc/eclipse/BD-app-jdk15mac.launch
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/AdvancedSearchPane.java
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleComboBoxModel.java
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleComboBoxModelSet.java
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/ParallelBookPicker.java
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/EditSitePane.java
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/InstallManagerComboBoxModel.java
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/InternetWarning.java
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/SitePane.java
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/Desktop.java
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/ViewSourcePane.java
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/basic/SplitBookDataDisplay.java
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/passage/KeySidebar.java
   trunk/common-swing/src/main/java/org/crosswire/common/progress/swing/JobsProgressBar.java
   trunk/common-swing/src/main/java/org/crosswire/common/swing/ActionFactory.java
   trunk/common-swing/src/main/java/org/crosswire/common/swing/AntiAliasedTextPane.java
   trunk/common-swing/src/main/java/org/crosswire/common/swing/CWAction.java
   trunk/common/JSwordDictionary.txt
   trunk/common/src/main/java/org/crosswire/common/icu/DateFormatter.java
   trunk/common/src/main/java/org/crosswire/common/icu/NumberShaper.java
   trunk/common/src/main/java/org/crosswire/common/options/GetOptions.java
   trunk/common/src/main/java/org/crosswire/common/progress/Job.java
   trunk/common/src/main/java/org/crosswire/common/util/CWProject.java
   trunk/jsword-support/tools/pmd/ruleset.xml
   trunk/jsword/src/main/java/org/crosswire/jsword/book/BookCategory.java
   trunk/jsword/src/main/java/org/crosswire/jsword/book/CaseType.java
   trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/AbstractBackend.java
   trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/ConfigEntryType.java
   trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/DataEntry.java
   trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/RawLDBackend.java
   trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/ZLDBackend.java
   trunk/jsword/src/main/java/org/crosswire/jsword/examples/APIExamples.java
   trunk/jsword/src/main/java/org/crosswire/jsword/index/search/DefaultSearchModifier.java
   trunk/jsword/src/main/java/org/crosswire/jsword/index/search/DefaultSearchRequest.java
   trunk/jsword/src/main/java/org/crosswire/jsword/index/search/SearchModifier.java
   trunk/jsword/src/main/java/org/crosswire/jsword/index/search/SearchRequest.java
   trunk/jsword/src/main/java/org/crosswire/jsword/passage/AbstractPassage.java
   trunk/jsword/src/main/java/org/crosswire/jsword/passage/Passage.java
   trunk/jsword/src/main/java/org/crosswire/jsword/passage/PassageKeyFactory.java
   trunk/jsword/src/main/java/org/crosswire/jsword/passage/SynchronizedPassage.java
   trunk/jsword/src/main/java/org/crosswire/jsword/passage/Verse.java
   trunk/jsword/src/main/java/org/crosswire/jsword/passage/VerseRange.java
   trunk/jsword/src/test/java/org/crosswire/jsword/book/ReadEverything.java
Log:
findbugs fixes


Modified: trunk/bibledesktop/etc/eclipse/BD-app-jdk15mac.launch
===================================================================
--- trunk/bibledesktop/etc/eclipse/BD-app-jdk15mac.launch	2008-07-08 21:03:20 UTC (rev 1889)
+++ trunk/bibledesktop/etc/eclipse/BD-app-jdk15mac.launch	2008-07-09 12:15:15 UTC (rev 1890)
@@ -15,6 +15,7 @@
 <stringAttribute key="org.eclipse.debug.ui.target_run_perspective" value="perspective_default"/>
 <stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.launching.macosx.MacOSXType/jdk-1.5.0"/>
 <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.crosswire.bibledesktop.desktop.Desktop"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="ESV"/>
 <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="bibledesktop"/>
 <stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx512m -ea"/>
 </launchConfiguration>

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/AdvancedSearchPane.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/AdvancedSearchPane.java	2008-07-08 21:03:20 UTC (rev 1889)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/AdvancedSearchPane.java	2008-07-09 12:15:15 UTC (rev 1890)
@@ -33,6 +33,8 @@
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.awt.event.KeyEvent;
+import java.io.IOException;
+import java.io.ObjectInputStream;
 import java.util.Dictionary;
 import java.util.Hashtable;
 
@@ -647,6 +649,19 @@
         return labels;
     }
 
+    /**
+     * Serialization support.
+     * 
+     * @param is
+     * @throws IOException
+     * @throws ClassNotFoundException
+     */
+    private void readObject(ObjectInputStream is) throws IOException, ClassNotFoundException
+    {
+        actions = new ActionFactory(AdvancedSearchPane.class, this);
+        is.defaultReadObject();
+    }
+
     /*
      * Action constants
      */

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleComboBoxModel.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleComboBoxModel.java	2008-07-08 21:03:20 UTC (rev 1889)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleComboBoxModel.java	2008-07-09 12:15:15 UTC (rev 1890)
@@ -21,6 +21,9 @@
  */
 package org.crosswire.bibledesktop.book;
 
+import java.io.IOException;
+import java.io.ObjectInputStream;
+
 import javax.swing.AbstractListModel;
 import javax.swing.ComboBoxModel;
 
@@ -244,6 +247,21 @@
     }
 
     /**
+     * Serialization support.
+     * 
+     * @param is
+     * @throws IOException
+     * @throws ClassNotFoundException
+     */
+    private void readObject(ObjectInputStream is) throws IOException, ClassNotFoundException
+    {
+        // Broken but we don't serialize views
+        set = null;
+        selected = null;
+        is.defaultReadObject();
+    }
+
+    /**
      * The log stream
      */
     private static final Logger log = Logger.getLogger(BibleComboBoxModel.class);

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleComboBoxModelSet.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleComboBoxModelSet.java	2008-07-08 21:03:20 UTC (rev 1889)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleComboBoxModelSet.java	2008-07-09 12:15:15 UTC (rev 1890)
@@ -25,6 +25,9 @@
 import java.awt.event.ActionListener;
 import java.awt.event.ItemEvent;
 import java.awt.event.ItemListener;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.Serializable;
 
 import javax.swing.JComboBox;
 import javax.swing.event.EventListenerList;
@@ -43,7 +46,7 @@
  * @author Joe Walker [joe at eireneh dot com]
  * @author DM Smith [dmsmith555 at yahoo dot com]
  */
-public class BibleComboBoxModelSet
+public class BibleComboBoxModelSet implements Serializable
 {
     public BibleComboBoxModelSet(JComboBox books, JComboBox chapters, JComboBox verses)
     {
@@ -212,10 +215,24 @@
     }
 
     /**
+     * Serialization support.
+     * 
+     * @param is
+     * @throws IOException
+     * @throws ClassNotFoundException
+     */
+    private void readObject(ObjectInputStream is) throws IOException, ClassNotFoundException
+    {
+        cil = new CustomItemListener();
+        is.defaultReadObject();
+    }
+
+    /**
      * For when a selection is made
      */
     final class CustomItemListener implements ItemListener
     {
+
         public void itemStateChanged(ItemEvent ev)
         {
             if (ev.getStateChange() == ItemEvent.SELECTED)
@@ -247,5 +264,10 @@
     protected BibleComboBoxModel mdlVerse;
 
     protected EventListenerList listeners;
-    private ItemListener cil;
+    private transient ItemListener cil;
+
+    /**
+     * Serialization ID
+     */
+    private static final long serialVersionUID = 5365220628525297473L;
 }

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/ParallelBookPicker.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/ParallelBookPicker.java	2008-07-08 21:03:20 UTC (rev 1889)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/ParallelBookPicker.java	2008-07-09 12:15:15 UTC (rev 1890)
@@ -235,6 +235,8 @@
      */
     private void readObject(ObjectInputStream is) throws IOException, ClassNotFoundException
     {
+        filter = null;
+        comparator = null;
         listeners = new EventListenerList();
         actions = new ActionFactory(ParallelBookPicker.class, this);
 

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/EditSitePane.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/EditSitePane.java	2008-07-08 21:03:20 UTC (rev 1889)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/EditSitePane.java	2008-07-09 12:15:15 UTC (rev 1890)
@@ -32,6 +32,8 @@
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.awt.event.KeyEvent;
+import java.io.IOException;
+import java.io.ObjectInputStream;
 
 import javax.swing.BorderFactory;
 import javax.swing.JButton;
@@ -529,6 +531,22 @@
         GuiUtil.refresh(this);
     }
 
+    /**
+     * Serialization support.
+     * 
+     * @param is
+     * @throws IOException
+     * @throws ClassNotFoundException
+     */
+    private void readObject(ObjectInputStream is) throws IOException, ClassNotFoundException
+    {
+        // Broken but we don't serialize views
+        imanager = null;
+        editInstaller = null;
+        actions = new ActionFactory(EditSitePane.class, this);
+        is.defaultReadObject();
+    }
+
     private static final String ADD = "Add"; //$NON-NLS-1$
     private static final String EDIT = "Edit"; //$NON-NLS-1$
     private static final String DELETE = "Delete"; //$NON-NLS-1$

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/InstallManagerComboBoxModel.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/InstallManagerComboBoxModel.java	2008-07-08 21:03:20 UTC (rev 1889)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/InstallManagerComboBoxModel.java	2008-07-09 12:15:15 UTC (rev 1890)
@@ -21,6 +21,8 @@
  */
 package org.crosswire.bibledesktop.book.install;
 
+import java.io.IOException;
+import java.io.ObjectInputStream;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
@@ -127,6 +129,20 @@
     }
 
     /**
+     * Serialization support.
+     * 
+     * @param is
+     * @throws IOException
+     * @throws ClassNotFoundException
+     */
+    private void readObject(ObjectInputStream is) throws IOException, ClassNotFoundException
+    {
+        // Broken but we don't serialize views
+        imanager = null;
+        is.defaultReadObject();
+    }
+
+    /**
      * The currently selected object
      */
     private Object selection;

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/InternetWarning.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/InternetWarning.java	2008-07-08 21:03:20 UTC (rev 1889)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/InternetWarning.java	2008-07-09 12:15:15 UTC (rev 1890)
@@ -27,6 +27,8 @@
 import java.awt.GridLayout;
 import java.awt.event.ItemEvent;
 import java.awt.event.ItemListener;
+import java.io.IOException;
+import java.io.ObjectInputStream;
 
 import javax.swing.JButton;
 import javax.swing.JCheckBox;
@@ -137,6 +139,19 @@
     }
 
     /**
+     * Serialization support.
+     * 
+     * @param is
+     * @throws IOException
+     * @throws ClassNotFoundException
+     */
+    private void readObject(ObjectInputStream is) throws IOException, ClassNotFoundException
+    {
+        actions = new ActionFactory(InternetWarning.class, this);
+        is.defaultReadObject();
+    }
+
+    /**
      * Access to the Internet is granted.
      */
     public static final int    GRANTED = 0;

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/SitePane.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/SitePane.java	2008-07-08 21:03:20 UTC (rev 1889)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/SitePane.java	2008-07-09 12:15:15 UTC (rev 1890)
@@ -588,7 +588,6 @@
         }
     }
 
-
     /**
      * Serialization support.
      * 

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/Desktop.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/Desktop.java	2008-07-08 21:03:20 UTC (rev 1889)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/Desktop.java	2008-07-09 12:15:15 UTC (rev 1890)
@@ -126,7 +126,7 @@
 
     static
     {
-        PROJECT.setHome("jsword.home", ".jsword", "JSword"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+        CWProject.setHome("jsword.home", ".jsword", "JSword"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
     }
 
     /**
@@ -1128,6 +1128,8 @@
      */
     private void readObject(ObjectInputStream is) throws IOException, ClassNotFoundException
     {
+        config = null;
+        history = null;
         actions = new DesktopActions(this);
         views = new ViewManager(this);
         views.addViewEventListener(this);

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/ViewSourcePane.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/ViewSourcePane.java	2008-07-08 21:03:20 UTC (rev 1889)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/ViewSourcePane.java	2008-07-09 12:15:15 UTC (rev 1890)
@@ -28,6 +28,8 @@
 import java.awt.Frame;
 import java.awt.Toolkit;
 import java.awt.datatransfer.StringSelection;
+import java.io.IOException;
+import java.io.ObjectInputStream;
 import java.net.URI;
 import java.util.Iterator;
 
@@ -265,6 +267,19 @@
         frame.dispose();
     }
 
+    /**
+     * Serialization support.
+     * 
+     * @param is
+     * @throws IOException
+     * @throws ClassNotFoundException
+     */
+    private void readObject(ObjectInputStream is) throws IOException, ClassNotFoundException
+    {
+        actions = new ActionFactory(ViewSourcePane.class, this);
+        is.defaultReadObject();
+    }
+
     /*
      * GUI Components
      */

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/basic/SplitBookDataDisplay.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/basic/SplitBookDataDisplay.java	2008-07-08 21:03:20 UTC (rev 1889)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/basic/SplitBookDataDisplay.java	2008-07-09 12:15:15 UTC (rev 1890)
@@ -23,6 +23,8 @@
 
 import java.awt.BorderLayout;
 import java.awt.Component;
+import java.io.IOException;
+import java.io.ObjectInputStream;
 import java.util.Arrays;
 
 import javax.swing.JPanel;
@@ -191,6 +193,20 @@
     }
 
     /**
+     * Serialization support.
+     * 
+     * @param is
+     * @throws IOException
+     * @throws ClassNotFoundException
+     */
+    private void readObject(ObjectInputStream is) throws IOException, ClassNotFoundException
+    {
+        // Broken but we don't serialize views
+        child = null;
+        is.defaultReadObject();
+    }
+
+    /**
      * The log stream
      */
     private static final Logger log = Logger.getLogger(SplitBookDataDisplay.class);

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/passage/KeySidebar.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/passage/KeySidebar.java	2008-07-08 21:03:20 UTC (rev 1889)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/passage/KeySidebar.java	2008-07-09 12:15:15 UTC (rev 1890)
@@ -23,6 +23,8 @@
 
 import java.awt.BorderLayout;
 import java.awt.FlowLayout;
+import java.io.IOException;
+import java.io.ObjectInputStream;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Iterator;
@@ -369,6 +371,21 @@
         }
     }
 
+    /**
+     * Serialization support.
+     * 
+     * @param is
+     * @throws IOException
+     * @throws ClassNotFoundException
+     */
+    private void readObject(ObjectInputStream is) throws IOException, ClassNotFoundException
+    {
+        // Broken but we don't serialize views
+        books = null;
+        keyChangeListeners = null;
+        is.defaultReadObject();
+    }
+
     private static final String BLUR1 = "Blur1"; //$NON-NLS-1$
     private static final String BLUR5 = "Blur5"; //$NON-NLS-1$
     private static final String DELETE_SELECTED = "DeleteSelected"; //$NON-NLS-1$

Modified: trunk/common/JSwordDictionary.txt
===================================================================
--- trunk/common/JSwordDictionary.txt	2008-07-08 21:03:20 UTC (rev 1889)
+++ trunk/common/JSwordDictionary.txt	2008-07-09 12:15:15 UTC (rev 1890)
@@ -78,3 +78,7 @@
 lucene
 acrostic
 compressor
+parented
+proxy
+inline
+clipboard

Modified: trunk/common/src/main/java/org/crosswire/common/icu/DateFormatter.java
===================================================================
--- trunk/common/src/main/java/org/crosswire/common/icu/DateFormatter.java	2008-07-08 21:03:20 UTC (rev 1889)
+++ trunk/common/src/main/java/org/crosswire/common/icu/DateFormatter.java	2008-07-09 12:15:15 UTC (rev 1890)
@@ -22,6 +22,7 @@
 
 package org.crosswire.common.icu;
 
+import java.lang.reflect.InvocationTargetException;
 import java.text.DateFormat;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
@@ -54,6 +55,7 @@
     public static DateFormatter getDateInstance(int format)
     {
         DateFormatter fmt = new DateFormatter();
+        boolean oops = false;
         try
         {
             fmt.formatterClass = ClassUtil.forName("com.ibm.icu.text.DateFormat"); //$NON-NLS-1$
@@ -62,11 +64,29 @@
             Object[] instanceParams = { new Integer(format) };
             fmt.formatter = ReflectionUtil.invoke(fmt.formatterClass, fmt.formatterClass, "getDateInstance", instanceParams, instanceTypes); //$NON-NLS-1$
         }
-        catch (Exception e)
+        catch (NoSuchMethodException e)
         {
+            oops = true;
+        }
+        catch (IllegalAccessException e)
+        {
+            oops = true;
+        }
+        catch (InvocationTargetException e)
+        {
+            oops = true;
+        }
+        catch (ClassNotFoundException e)
+        {
+            oops = true;
+        }
+
+        if (oops)
+        {
             fmt.formatterClass = DateFormat.class;
             fmt.formatter = DateFormat.getDateInstance(format);
         }
+ 
         return fmt;
     }
 
@@ -84,17 +104,40 @@
     public static DateFormatter getSimpleDateInstance(String format)
     {
         DateFormatter fmt = new DateFormatter();
+        boolean oops = false;
         try
         {
             fmt.formatterClass = ClassUtil.forName("com.ibm.icu.text.SimpleDateFormat"); //$NON-NLS-1$
             Object[] instanceParams = { format };
             fmt.formatter = ReflectionUtil.construct("com.ibm.icu.text.SimpleDateFormat", instanceParams); //$NON-NLS-1$
         }
-        catch (Exception e)
+        catch (NoSuchMethodException e)
         {
+            oops = true;
+        }
+        catch (IllegalAccessException e)
+        {
+            oops = true;
+        }
+        catch (InvocationTargetException e)
+        {
+            oops = true;
+        }
+        catch (ClassNotFoundException e)
+        {
+            oops = true;
+        }
+        catch (InstantiationException e)
+        {
+            oops = true;
+        }
+
+        if (oops)
+        {
             fmt.formatterClass = SimpleDateFormat.class;
             fmt.formatter = new SimpleDateFormat(format);
         }
+
         return fmt;
     }
 
@@ -109,11 +152,18 @@
             Object[] lenientParams = { Boolean.valueOf(lenient) };
             ReflectionUtil.invoke(formatterClass, formatter, "setLenient", lenientParams, lenientTypes); //$NON-NLS-1$
         }
-        catch (Exception e)
+        catch (NoSuchMethodException e)
         {
-            // silently fail
             assert false : e;
         }
+        catch (IllegalAccessException e)
+        {
+            assert false : e;
+        }
+        catch (InvocationTargetException e)
+        {
+            assert false : e;
+        }
     }
 
     /* (non-Javadoc)

Modified: trunk/common/src/main/java/org/crosswire/common/icu/NumberShaper.java
===================================================================
--- trunk/common/src/main/java/org/crosswire/common/icu/NumberShaper.java	2008-07-08 21:03:20 UTC (rev 1889)
+++ trunk/common/src/main/java/org/crosswire/common/icu/NumberShaper.java	2008-07-09 12:15:15 UTC (rev 1890)
@@ -22,6 +22,7 @@
 
 package org.crosswire.common.icu;
 
+import java.io.Serializable;
 import java.util.Locale;
 
 /**
@@ -48,7 +49,7 @@
  *      The copyright to this program is held by it's authors.
  * @author DM Smith [dmsmith555 at yahoo dot com]
  */
-public class NumberShaper
+public class NumberShaper implements Serializable
 {
     /**
      * Create a shaper that is appropriate for the user's locale.
@@ -330,4 +331,9 @@
      * Nine for this shaper.
      */
     private char nineShape;
+
+    /**
+     * Serialization ID
+     */
+    private static final long serialVersionUID = -8408052851113601251L;
 }

Modified: trunk/common/src/main/java/org/crosswire/common/options/GetOptions.java
===================================================================
--- trunk/common/src/main/java/org/crosswire/common/options/GetOptions.java	2008-07-08 21:03:20 UTC (rev 1889)
+++ trunk/common/src/main/java/org/crosswire/common/options/GetOptions.java	2008-07-09 12:15:15 UTC (rev 1890)
@@ -75,7 +75,7 @@
     public GetOptions(String programName, String[] args, OptionList programOptions)
     {
         this.programName = programName;
-        this.args = args;
+        this.args = (String[]) args.clone();
         this.programOptions = programOptions;
         // Initially, we have not started to process an argument
         this.nonOptionArgs = new ArrayList();

Modified: trunk/common/src/main/java/org/crosswire/common/progress/Job.java
===================================================================
--- trunk/common/src/main/java/org/crosswire/common/progress/Job.java	2008-07-08 21:03:20 UTC (rev 1889)
+++ trunk/common/src/main/java/org/crosswire/common/progress/Job.java	2008-07-09 12:15:15 UTC (rev 1890)
@@ -206,9 +206,12 @@
 
         JobManager.fireWorkProgressed(this);
 
-        if (predictURI != null)
+        synchronized (this)
         {
-            savePredictions();
+            if (predictURI != null)
+            {
+                savePredictions();
+            }
         }
     }
 
@@ -285,7 +288,7 @@
      * Typically called from in a catch block, this ensures that we don't save
      * the timing file because we have a messed up run.
      */
-    private void ignoreTimings()
+    private synchronized void ignoreTimings()
     {
         predictURI = null;
     }

Modified: trunk/common/src/main/java/org/crosswire/common/util/CWProject.java
===================================================================
--- trunk/common/src/main/java/org/crosswire/common/util/CWProject.java	2008-07-08 21:03:20 UTC (rev 1889)
+++ trunk/common/src/main/java/org/crosswire/common/util/CWProject.java	2008-07-09 12:15:15 UTC (rev 1890)
@@ -73,12 +73,12 @@
      * @param altHomeDir the name of the directory to be used for other OSes. This should not be a hidden directory.
      *                Defaults to JSword.
      */
-    public void setHome(String homeProperty, String homeDir, String altHomeDir)
+    public static void setHome(String homeProperty, String homeDir, String altHomeDir)
     {
         CWProject.homeProperty = homeProperty;
         CWProject.homeDirectory = homeDir;
         CWProject.homeAltDirectory = altHomeDir;
-        establishProjectHome();
+        instance().establishProjectHome();
     }
 
     /**
@@ -100,7 +100,7 @@
     public URI[] getProjectResourceDirs()
     {
         establishProjectHome();
-        return homes;
+        return (URI[]) homes.clone();
     }
 
     /**

Modified: trunk/common-swing/src/main/java/org/crosswire/common/progress/swing/JobsProgressBar.java
===================================================================
--- trunk/common-swing/src/main/java/org/crosswire/common/progress/swing/JobsProgressBar.java	2008-07-08 21:03:20 UTC (rev 1889)
+++ trunk/common-swing/src/main/java/org/crosswire/common/progress/swing/JobsProgressBar.java	2008-07-09 12:15:15 UTC (rev 1890)
@@ -26,6 +26,8 @@
 import java.awt.GridBagConstraints;
 import java.awt.GridBagLayout;
 import java.awt.GridLayout;
+import java.io.IOException;
+import java.io.ObjectInputStream;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -236,6 +238,19 @@
     }
 
     /**
+     * Serialization support.
+     * 
+     * @param is
+     * @throws IOException
+     * @throws ClassNotFoundException
+     */
+    private void readObject(ObjectInputStream is) throws IOException, ClassNotFoundException
+    {
+        actions = new ActionFactory(JobsProgressBar.class, this);
+        is.defaultReadObject();
+    }
+
+    /**
      * Where we store the currently displayed jobs
      */
     protected Map jobs;
@@ -258,7 +273,7 @@
     /**
      * The home of the stop action.
      */
-    private ActionFactory actions;
+    private transient ActionFactory actions;
 
     /**
      * The key for the Stop action.

Modified: trunk/common-swing/src/main/java/org/crosswire/common/swing/ActionFactory.java
===================================================================
--- trunk/common-swing/src/main/java/org/crosswire/common/swing/ActionFactory.java	2008-07-08 21:03:20 UTC (rev 1889)
+++ trunk/common-swing/src/main/java/org/crosswire/common/swing/ActionFactory.java	2008-07-09 12:15:15 UTC (rev 1890)
@@ -131,16 +131,6 @@
      */
     public ActionFactory(Class type, Object bean)
     {
-        try
-        {
-            Class basis = this.getClass();
-            aliases = ResourceBundle.getBundle(ALIASES, Locale.getDefault(), CWClassLoader.instance(basis));
-        }
-        catch (MissingResourceException ex)
-        {
-            log.error("Tell me it isn't so. The Aliases.properties does exist!", ex); //$NON-NLS-1$
-        }
-
         actions = new HashMap();
 
         buildActionMap(type);
@@ -625,14 +615,26 @@
     private static final String ALIAS = "Alias" + SEPARATOR; //$NON-NLS-1$
 
     /**
+     * The log stream
+     */
+    private static final Logger log = Logger.getLogger(ActionFactory.class);
+
+    /**
      * The aliases known by this system.
      */
     private static ResourceBundle aliases;
 
-   /**
-     * The log stream
-     */
-    private static final Logger log = Logger.getLogger(ActionFactory.class);
+    static
+    {
+        try
+        {
+            aliases = ResourceBundle.getBundle(ALIASES, Locale.getDefault(), CWClassLoader.instance(ActionFactory.class));
+        }
+        catch (MissingResourceException ex)
+        {
+            log.error("Tell me it isn't so. The Aliases.properties does exist!", ex); //$NON-NLS-1$
+        }
+    }
 
     /**
      * The map of known CWActions

Modified: trunk/common-swing/src/main/java/org/crosswire/common/swing/AntiAliasedTextPane.java
===================================================================
--- trunk/common-swing/src/main/java/org/crosswire/common/swing/AntiAliasedTextPane.java	2008-07-08 21:03:20 UTC (rev 1889)
+++ trunk/common-swing/src/main/java/org/crosswire/common/swing/AntiAliasedTextPane.java	2008-07-09 12:15:15 UTC (rev 1890)
@@ -43,15 +43,17 @@
     /* @Override */
     public void paintComponent(Graphics g)
     {
-        Graphics2D g2 = (Graphics2D) g;
-
-        if (antiAliasing)
+        if (g instanceof Graphics2D)
         {
-            g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
-            g2.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
+            Graphics2D g2 = (Graphics2D) g;
+    
+            if (antiAliasing)
+            {
+                g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
+                g2.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
+            }
         }
-
-        super.paintComponent(g2);
+        super.paintComponent(g);
     }
 
     /**

Modified: trunk/common-swing/src/main/java/org/crosswire/common/swing/CWAction.java
===================================================================
--- trunk/common-swing/src/main/java/org/crosswire/common/swing/CWAction.java	2008-07-08 21:03:20 UTC (rev 1889)
+++ trunk/common-swing/src/main/java/org/crosswire/common/swing/CWAction.java	2008-07-09 12:15:15 UTC (rev 1890)
@@ -38,7 +38,7 @@
  *      The copyright to this program is held by it's authors.
  * @author DM Smith [dmsmith555 at yahoo dot com]
  */
-public class CWAction extends AbstractAction implements Cloneable
+public class CWAction extends AbstractAction
 {
     /**
      * The icon to display when a large one is needed.

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/BookCategory.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/BookCategory.java	2008-07-08 21:03:20 UTC (rev 1889)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/BookCategory.java	2008-07-09 12:15:15 UTC (rev 1890)
@@ -190,8 +190,8 @@
     /**
      * The names of the BookCategory
      */
-    private String name;
-    private MsgBase externalName;
+    private transient String name;
+    private transient MsgBase externalName;
 
     // Support for serialization
     private static int nextObj;

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/CaseType.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/CaseType.java	2008-07-08 21:03:20 UTC (rev 1889)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/CaseType.java	2008-07-09 12:15:15 UTC (rev 1890)
@@ -236,7 +236,7 @@
     /**
      * The name of the type
      */
-    private String name;
+    private transient String name;
 
     // Support for serialization
     private static int nextObj;

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/AbstractBackend.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/AbstractBackend.java	2008-07-08 21:03:20 UTC (rev 1889)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/AbstractBackend.java	2008-07-09 12:15:15 UTC (rev 1890)
@@ -40,6 +40,13 @@
 public abstract class AbstractBackend implements Activatable
 {
     /**
+     * Default constructor for the sake of serialization.
+     */
+    /* protected */ public AbstractBackend()
+    {
+    }
+
+    /**
      * Construct a minimal backend
      * @param sbmd
      */
@@ -74,7 +81,6 @@
             // destroy any evidence!
             cipherEngine.burn();
         }
-        cipherKeyString = null;
     }
 
     /**

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/ConfigEntryType.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/ConfigEntryType.java	2008-07-08 21:03:20 UTC (rev 1889)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/ConfigEntryType.java	2008-07-09 12:15:15 UTC (rev 1890)
@@ -217,7 +217,7 @@
         public ConfigEntryPickType(String name, String[] picks, Object defaultPick)
         {
             super(name, defaultPick);
-            choiceArray = picks;
+            choiceArray = (String[]) picks.clone();
         }
 
         /* (non-Javadoc)

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/DataEntry.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/DataEntry.java	2008-07-08 21:03:20 UTC (rev 1889)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/DataEntry.java	2008-07-09 12:15:15 UTC (rev 1890)
@@ -47,7 +47,7 @@
     public DataEntry(String name, byte[] data, String charset)
     {
         this.name    = name;
-        this.data    = data;
+        this.data    = (byte[]) data.clone();
         this.charset = charset;
     }
 

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/RawLDBackend.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/RawLDBackend.java	2008-07-08 21:03:20 UTC (rev 1889)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/RawLDBackend.java	2008-07-09 12:15:15 UTC (rev 1890)
@@ -23,6 +23,7 @@
 
 import java.io.File;
 import java.io.IOException;
+import java.io.ObjectInputStream;
 import java.io.RandomAccessFile;
 import java.net.URI;
 import java.text.DecimalFormat;
@@ -491,7 +492,26 @@
 
         return keytitle;
     }
+
     /**
+     * Serialization support.
+     * 
+     * @param is
+     * @throws IOException
+     * @throws ClassNotFoundException
+     */
+    private void readObject(ObjectInputStream is) throws IOException, ClassNotFoundException
+    {
+        active = false;
+        size = -1;
+        idxFile = null;
+        datFile = null;
+        idxRaf = null;
+        datRaf = null;
+        is.defaultReadObject();
+    }
+
+    /**
      * How many bytes in the offset pointers in the index
      */
     private static final int OFFSETSIZE = 4;
@@ -499,7 +519,7 @@
     /**
      * Flags whether there are open files or not
      */
-    private boolean active;
+    private transient boolean active;
 
     /**
      * The number of bytes in the size count in the index
@@ -514,27 +534,27 @@
     /**
      * The number of entries in the book.
      */
-    private int size;
+    private transient int size;
 
     /**
      * The index file
      */
-    private File idxFile;
+    private transient File idxFile;
 
     /**
      * The index random access file
      */
-    private RandomAccessFile idxRaf;
+    private transient RandomAccessFile idxRaf;
 
     /**
      * The data file
      */
-    private File datFile;
+    private transient File datFile;
 
     /**
      * The data random access file
      */
-    private RandomAccessFile datRaf;
+    private transient RandomAccessFile datRaf;
 
     /**
      * Date formatter

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/ZLDBackend.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/ZLDBackend.java	2008-07-08 21:03:20 UTC (rev 1889)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/ZLDBackend.java	2008-07-09 12:15:15 UTC (rev 1890)
@@ -23,6 +23,7 @@
 
 import java.io.File;
 import java.io.IOException;
+import java.io.ObjectInputStream;
 import java.io.RandomAccessFile;
 import java.net.URI;
 
@@ -216,6 +217,25 @@
         return active && super.isActive();
     }
 
+    /**
+     * Serialization support.
+     * 
+     * @param is
+     * @throws IOException
+     * @throws ClassNotFoundException
+     */
+    private void readObject(ObjectInputStream is) throws IOException, ClassNotFoundException
+    {
+        active = false;
+        zdxFile = null;
+        zdtFile = null;
+        zdxRaf = null;
+        zdtRaf = null;
+        lastBlockNum = -1;
+        lastUncompressed = EMPTY_BYTES;
+        is.defaultReadObject();
+    }
+
     private static final String EXTENSION_Z_INDEX = ".zdx"; //$NON-NLS-1$
     private static final String EXTENSION_Z_DATA  = ".zdt"; //$NON-NLS-1$
 
@@ -227,37 +247,37 @@
     /**
      * Flags whether there are open files or not
      */
-    private boolean             active;
+    private transient boolean             active;
 
     /**
      * The compressed index.
      */
-    private File                zdxFile;
+    private transient File                zdxFile;
 
     /**
      * The compressed index random access file.
      */
-    private RandomAccessFile    zdxRaf;
+    private transient RandomAccessFile    zdxRaf;
 
     /**
      * The compressed text.
      */
-    private File                zdtFile;
+    private transient File                zdtFile;
 
     /**
      * The compressed text random access file.
      */
-    private RandomAccessFile    zdtRaf;
+    private transient RandomAccessFile    zdtRaf;
 
     /**
      * The index of the block that is cached.
      */
-    private long                lastBlockNum;
+    private transient long                lastBlockNum;
 
     /**
      * The cache for a read of a compressed block.
      */
-    private byte[]              lastUncompressed;
+    private transient byte[]              lastUncompressed;
 
     /**
      * Serialization ID

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/examples/APIExamples.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/examples/APIExamples.java	2008-07-08 21:03:20 UTC (rev 1889)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/examples/APIExamples.java	2008-07-09 12:15:15 UTC (rev 1890)
@@ -342,15 +342,18 @@
         Map installers = imanager.getInstallers();
 
         // Get all the installers one after the other
-        Iterator iter = installers.keySet().iterator();
+        Iterator iter = installers.entrySet().iterator();
+        String name = null;
         while (iter.hasNext())
         {
-            String name = (String) iter.next();
-            installer = (Installer) installers.get(name);
+            Map.Entry mapEntry = (Map.Entry) iter.next();
+            name = (String) mapEntry.getKey();
+            installer = (Installer) mapEntry.getValue();
         }
 
+        name = "CrossWire"; //$NON-NLS-1$
         // If we know the name of the installer we can get it directly
-        installer = imanager.getInstaller("CrossWire"); //$NON-NLS-1$
+        installer = imanager.getInstaller(name);
 
         // Now we can get the list of books
         try

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/index/search/DefaultSearchModifier.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/index/search/DefaultSearchModifier.java	2008-07-08 21:03:20 UTC (rev 1889)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/index/search/DefaultSearchModifier.java	2008-07-09 12:15:15 UTC (rev 1890)
@@ -33,7 +33,6 @@
 
 public class DefaultSearchModifier implements SearchModifier
 {
-
     /* (non-Javadoc)
      * @see org.crosswire.jsword.index.search.SearchModifier#isRanked()
      */
@@ -55,4 +54,9 @@
      * The indicator of whether the request should be ranked.
      */
     private boolean ranked;
+
+    /**
+     * Serialization ID
+     */
+    private static final long serialVersionUID = 0L;
 }

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/index/search/DefaultSearchRequest.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/index/search/DefaultSearchRequest.java	2008-07-08 21:03:20 UTC (rev 1889)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/index/search/DefaultSearchRequest.java	2008-07-09 12:15:15 UTC (rev 1890)
@@ -31,7 +31,6 @@
  */
 public class DefaultSearchRequest implements SearchRequest
 {
-
     /**
      * Create a DefaultSearchRequest for the provided request and
      * the provided modifiers.
@@ -78,4 +77,9 @@
      * How the search is to be modified
      */
     private SearchModifier modifier;
+
+    /**
+     * Serialization ID
+     */
+    private static final long serialVersionUID = -5973134101547369187L;
 }

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/index/search/SearchModifier.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/index/search/SearchModifier.java	2008-07-08 21:03:20 UTC (rev 1889)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/index/search/SearchModifier.java	2008-07-09 12:15:15 UTC (rev 1890)
@@ -21,6 +21,8 @@
  */
 package org.crosswire.jsword.index.search;
 
+import java.io.Serializable;
+
 /**
  * A SearchModifier consists of the kinds of changes that
  * can be done to a search.
@@ -29,7 +31,7 @@
  *      The copyright to this program is held by it's authors.
  * @author DM Smith [dmsmith555 at yahoo dot com]
  */
-public interface SearchModifier
+public interface SearchModifier extends Serializable
 {
     /**
      * @return true if the results of the search request should be ranked

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/index/search/SearchRequest.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/index/search/SearchRequest.java	2008-07-08 21:03:20 UTC (rev 1889)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/index/search/SearchRequest.java	2008-07-09 12:15:15 UTC (rev 1890)
@@ -21,6 +21,8 @@
  */
 package org.crosswire.jsword.index.search;
 
+import java.io.Serializable;
+
 /**
  * A SearchRequest consists of a string and modifiers for the search.
  *
@@ -28,7 +30,7 @@
  *      The copyright to this program is held by it's authors.
  * @author DM Smith [dmsmith555 at yahoo dot com]
  */
-public interface SearchRequest
+public interface SearchRequest extends Serializable
 {
     /**
      * @return the modifications to this SearchRequest

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/passage/AbstractPassage.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/passage/AbstractPassage.java	2008-07-08 21:03:20 UTC (rev 1889)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/passage/AbstractPassage.java	2008-07-09 12:15:15 UTC (rev 1890)
@@ -1483,4 +1483,9 @@
      * What characters should we use to separate VerseRanges in a Passage
      */
     public static final String REF_OSIS_DELIM = " "; //$NON-NLS-1$
+
+    /**
+     * Serialization ID
+     */
+    static final long serialVersionUID = -5931560451407396276L;
 }

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/passage/Passage.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/passage/Passage.java	2008-07-08 21:03:20 UTC (rev 1889)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/passage/Passage.java	2008-07-09 12:15:15 UTC (rev 1890)
@@ -23,7 +23,6 @@
 
 import java.io.IOException;
 import java.io.Reader;
-import java.io.Serializable;
 import java.io.Writer;
 import java.util.Iterator;
 
@@ -71,7 +70,7 @@
  *      The copyright to this program is held by it's authors.
  * @author Joe Walker [joe at eireneh dot com]
  */
-public interface Passage extends Key, Serializable
+public interface Passage extends Key
 {
     /**
      * A summary of the verses in this Passage

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/passage/PassageKeyFactory.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/passage/PassageKeyFactory.java	2008-07-08 21:03:20 UTC (rev 1889)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/passage/PassageKeyFactory.java	2008-07-09 12:15:15 UTC (rev 1890)
@@ -43,15 +43,6 @@
      */
     private PassageKeyFactory()
     {
-        try
-        {
-            whole = new ReadOnlyPassage(defaultType.createPassage("Gen 1:1-Rev 22:21"), true); //$NON-NLS-1$
-        }
-        catch (NoSuchKeyException ex)
-        {
-            assert false : ex;
-            whole = defaultType.createEmptyPassage();
-        }
     }
 
     public static KeyFactory instance()
@@ -587,4 +578,16 @@
      */
     private static Passage whole;
 
+    static
+    {
+        try
+        {
+            whole = new ReadOnlyPassage(defaultType.createPassage("Gen 1:1-Rev 22:21"), true); //$NON-NLS-1$
+        }
+        catch (NoSuchKeyException ex)
+        {
+            assert false : ex;
+            whole = defaultType.createEmptyPassage();
+        }
+    }
 }

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/passage/SynchronizedPassage.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/passage/SynchronizedPassage.java	2008-07-08 21:03:20 UTC (rev 1889)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/passage/SynchronizedPassage.java	2008-07-09 12:15:15 UTC (rev 1890)
@@ -365,7 +365,10 @@
         try
         {
             clone = (SynchronizedPassage) super.clone();
-            clone.ref = (Passage) ref.clone();
+            synchronized (clone)
+            {
+                clone.ref = (Passage) ref.clone();
+            }
         }
         catch (CloneNotSupportedException e)
         {

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/passage/Verse.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/passage/Verse.java	2008-07-08 21:03:20 UTC (rev 1889)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/passage/Verse.java	2008-07-09 12:15:15 UTC (rev 1890)
@@ -24,7 +24,6 @@
 import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
-import java.io.Serializable;
 import java.util.Iterator;
 
 import org.crosswire.common.icu.NumberShaper;
@@ -43,9 +42,9 @@
  * be mis-translated in some way.</p>
  *
  * <p>Optimization information: I spent some time optimizing this class
- * because it is at the heart of things. My benchmark started st 11.25s.
+ * because it is at the heart of things. My benchmark started at 11.25s.
  * By taking the int[] and turning it into 3 ints and it took 10.8s.<br />
- * Cacheing the ordinal number just took the time from 12s to 12s! I guess
+ * Caching the ordinal number just took the time from 12s to 12s! I guess
  * that the time and extra memory taken up by the extra int overrode the
  * time it saved by repeated queries to the same verse. I guess this would
  * change if we were using a [Ranged|Distinct]Passage instead of a Bitwise
@@ -60,7 +59,7 @@
  *      The copyright to this program is held by it's authors.
  * @author Joe Walker [joe at eireneh dot com]
  */
-public final class Verse implements Key, Serializable
+public final class Verse implements Key
 {
     /**
      * The default Verse is Genesis 1:1. I didn't want to provide this

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/passage/VerseRange.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/passage/VerseRange.java	2008-07-08 21:03:20 UTC (rev 1889)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/passage/VerseRange.java	2008-07-09 12:15:15 UTC (rev 1890)
@@ -24,7 +24,6 @@
 import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
-import java.io.Serializable;
 import java.util.Iterator;
 import java.util.NoSuchElementException;
 
@@ -44,8 +43,8 @@
  *      The copyright to this program is held by it's authors.
  * @author Joe Walker [joe at eireneh dot com]
  * @author DM Smith [dmsmith555 at yahoo dot com]
- */
-public final class VerseRange implements Key, Serializable
+ */ 
+public final class VerseRange implements Key
 {
     /**
      * The default VerseRange is a single verse - Genesis 1:1. I didn't

Modified: trunk/jsword/src/test/java/org/crosswire/jsword/book/ReadEverything.java
===================================================================
--- trunk/jsword/src/test/java/org/crosswire/jsword/book/ReadEverything.java	2008-07-08 21:03:20 UTC (rev 1889)
+++ trunk/jsword/src/test/java/org/crosswire/jsword/book/ReadEverything.java	2008-07-09 12:15:15 UTC (rev 1890)
@@ -65,7 +65,7 @@
         // To ensure this we place it at the top of the class!
         // This will set it as a place to look for overrides for
         // ResourceBundles, properties and other resources
-        CWProject.instance().setHome("jsword.home", ".jsword", "JSword"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+        CWProject.setHome("jsword.home", ".jsword", "JSword"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 
         // And the array of allowed osis>html converters
         ChoiceFactory.getDataMap().put("converters", new String[] {}); //$NON-NLS-1$

Modified: trunk/jsword-support/tools/pmd/ruleset.xml
===================================================================
--- trunk/jsword-support/tools/pmd/ruleset.xml	2008-07-08 21:03:20 UTC (rev 1889)
+++ trunk/jsword-support/tools/pmd/ruleset.xml	2008-07-09 12:15:15 UTC (rev 1890)
@@ -151,17 +151,18 @@
   <rule ref="rulesets/braces.xml/IfElseStmtsMustUseBraces"/>
   <rule ref="rulesets/braces.xml/ForLoopsMustUseBraces"/>
 
-  <rule ref="rulesets/codesize.xml/NPathComplexity"/>
+  <!-- Better handled by other tools -->
+  <!-- <rule ref="rulesets/codesize.xml/NPathComplexity"/> 1.0.8 -->
   <!-- <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"/> 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/codesize.xml/NcssMethodCount"/>
-  <rule ref="rulesets/codesize.xml/NcssTypeCount"/>
-  <rule ref="rulesets/codesize.xml/NcssConstructorCount"/>
-  <rule ref="rulesets/codesize.xml/TooManyMethods"/>
+  <!-- <rule ref="rulesets/codesize.xml/NcssMethodCount"/> 1.0.8 -->
+  <!-- <rule ref="rulesets/codesize.xml/NcssTypeCount"/> 1.0.8 -->
+  <!-- <rule ref="rulesets/codesize.xml/NcssConstructorCount"/> 1.0.8 -->
+  <!-- <rule ref="rulesets/codesize.xml/TooManyMethods"/> 1.0.8 better handled by CheckStyle -->
 
   <rule ref="rulesets/j2ee.xml/UseProperClassLoader"/>
   <rule ref="rulesets/j2ee.xml/MDBAndSessionBeanNamingConvention"/>
@@ -254,9 +255,11 @@
   <rule ref="rulesets/migrating.xml/ByteInstantiation"/>
   <rule ref="rulesets/migrating.xml/ShortInstantiation"/>
   <rule ref="rulesets/migrating.xml/LongInstantiation"/>
+  <!-- We don't use JUnit4
   <rule ref="rulesets/migrating.xml/JUnit4TestShouldUseBeforeAnnotation"/>
   <rule ref="rulesets/migrating.xml/JUnit4TestShouldUseAfterAnnotation"/>
   <rule ref="rulesets/migrating.xml/JUnit4TestShouldUseTestAnnotation"/>
   <rule ref="rulesets/migrating.xml/JUnit4SuitesShouldUseSuiteAnnotation"/>
   <rule ref="rulesets/migrating.xml/JUnitUseExpected"/>
+  -->
 </ruleset>




More information about the jsword-svn mailing list