[jsword-svn] r1155 - in trunk/jsword-limbo/src: main/java/org/crosswire/bibledesktop/book main/java/org/crosswire/common/config/swing main/java/org/crosswire/common/util main/java/org/crosswire/jsword/book/jdbc main/java/org/crosswire/jsword/book/raw main/java/org/crosswire/jsword/book/remote main/java/org/crosswire/jsword/book/ser main/java/org/crosswire/jsword/book/stub test/java/org/crosswire test/java/org/crosswire/common test/java/org/crosswire/common/util
dmsmith at www.crosswire.org
dmsmith at www.crosswire.org
Tue Oct 10 16:35:05 MST 2006
Author: dmsmith
Date: 2006-10-10 16:34:40 -0700 (Tue, 10 Oct 2006)
New Revision: 1155
Added:
trunk/jsword-limbo/src/main/java/org/crosswire/common/config/swing/LimboMsg.properties
trunk/jsword-limbo/src/main/java/org/crosswire/common/config/swing/MapField.properties
trunk/jsword-limbo/src/main/java/org/crosswire/common/config/swing/Msg.java
trunk/jsword-limbo/src/main/java/org/crosswire/common/util/ThreadUtil.java
trunk/jsword-limbo/src/test/java/org/crosswire/common/
trunk/jsword-limbo/src/test/java/org/crosswire/common/util/
trunk/jsword-limbo/src/test/java/org/crosswire/common/util/ThreadUtilTest.java
Modified:
trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/book/CommentaryPane.java
trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/jdbc/JDBCBook.java
trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/raw/RawBook.java
trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/remote/RemoteBook.java
trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/ser/SerBook.java
trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/stub/StubBook.java
trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/stub/StubDictionary.java
Log:
Fixing bugs reported by findbugs.
Modified: trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/book/CommentaryPane.java
===================================================================
--- trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/book/CommentaryPane.java 2006-10-10 23:33:39 UTC (rev 1154)
+++ trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/book/CommentaryPane.java 2006-10-10 23:34:40 UTC (rev 1155)
@@ -234,11 +234,11 @@
* GUI components
*/
private BooksComboBoxModel mdlcomments = new BooksComboBoxModel(filter);
- protected BibleComboBoxModelSet set = new BibleComboBoxModelSet();
- protected JComboBox cboComments = new JComboBox();
private JComboBox cboBooks = new JComboBox();
private JComboBox cboChaps = new JComboBox();
private JComboBox cboVerse = new JComboBox();
+ protected BibleComboBoxModelSet set = new BibleComboBoxModelSet(cboBooks, cboChaps, cboVerse);
+ protected JComboBox cboComments = new JComboBox();
private JPanel pnlSelect = new JPanel();
private JPanel pnlTop = new JPanel();
Added: trunk/jsword-limbo/src/main/java/org/crosswire/common/config/swing/LimboMsg.properties
===================================================================
--- trunk/jsword-limbo/src/main/java/org/crosswire/common/config/swing/LimboMsg.properties 2006-10-10 23:33:39 UTC (rev 1154)
+++ trunk/jsword-limbo/src/main/java/org/crosswire/common/config/swing/LimboMsg.properties 2006-10-10 23:34:40 UTC (rev 1155)
@@ -0,0 +1,13 @@
+# The naming convention for the keys in the file is ClassName.MessageName
+# Where ClassName is the name of the class using the property.
+# When the resource is used by more than one class it should be the one
+# that the resource is most closely associated.
+# The MessageName should be mixed case, with a leading capital.
+# It should have no spaces or other punctuation (e.g. _, -, ', ...)
+
+MapField.Class=Class
+MapField.Name=Name
+MapField.ComponentEditor=Component Editor
+MapField.EditClass=Edit Class
+MapField.ClassNotFound=A class named {0} could not be found.
+MapField.BadSuperclass=The class {0} does not inherit from {1}. Instansiation failed.
\ No newline at end of file
Copied: trunk/jsword-limbo/src/main/java/org/crosswire/common/config/swing/MapField.properties (from rev 1143, trunk/common-swing/src/main/java/org/crosswire/common/config/swing/MapField.properties)
Property changes on: trunk/jsword-limbo/src/main/java/org/crosswire/common/config/swing/MapField.properties
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added: trunk/jsword-limbo/src/main/java/org/crosswire/common/config/swing/Msg.java
===================================================================
--- trunk/jsword-limbo/src/main/java/org/crosswire/common/config/swing/Msg.java 2006-10-10 23:33:39 UTC (rev 1154)
+++ trunk/jsword-limbo/src/main/java/org/crosswire/common/config/swing/Msg.java 2006-10-10 23:34:40 UTC (rev 1155)
@@ -0,0 +1,60 @@
+/**
+ * Distribution License:
+ * JSword is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License, version 2.1 as published by
+ * the Free Software Foundation. This program is distributed in the hope
+ * that it will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * The License is available on the internet at:
+ * http://www.gnu.org/copyleft/lgpl.html
+ * or by writing to:
+ * Free Software Foundation, Inc.
+ * 59 Temple Place - Suite 330
+ * Boston, MA 02111-1307, USA
+ *
+ * Copyright: 2005
+ * The copyright to this program is held by it's authors.
+ *
+ * ID: $Id: Msg.java 763 2005-07-27 19:26:43 -0400 (Wed, 27 Jul 2005) dmsmith $
+ */
+package org.crosswire.common.config.swing;
+
+import org.crosswire.common.util.MsgBase;
+
+/**
+ * Compile safe Msg resource settings.
+ *
+ * @see gnu.lgpl.License for license details.
+ * The copyright to this program is held by it's authors.
+ * @author Joe Walker [joe at eireneh dot com]
+ */
+public final class Msg extends MsgBase
+{
+ static final Msg EDIT = new Msg("ColorField.Edit"); //$NON-NLS-1$
+ static final Msg CONFIG_SAVE_FAILED = new Msg("ConfigEditorFactory.ConfigFileFailed"); //$NON-NLS-1$
+ static final Msg SELECT_FONT = new Msg("FontField.SelectFont"); //$NON-NLS-1$
+ static final Msg CLASS = new Msg("MapField.Class"); //$NON-NLS-1$
+ static final Msg NAME = new Msg("MapField.Name"); //$NON-NLS-1$
+ static final Msg COMPONENT_EDITOR = new Msg("MapField.ComponentEditor"); //$NON-NLS-1$
+ static final Msg EDIT_CLASS = new Msg("MapField.EditClass"); //$NON-NLS-1$
+ static final Msg CLASS_NOT_FOUND = new Msg("MapField.ClassNotFound."); //$NON-NLS-1$
+ static final Msg BAD_SUPERCLASS = new Msg("MapField.BadSuperclass"); //$NON-NLS-1$
+ static final Msg ERROR = new Msg("OptionsField.Error"); //$NON-NLS-1$
+ static final Msg NO_OPTIONS = new Msg("OptionsField.NoOptions"); //$NON-NLS-1$
+ static final Msg PATH_EDITOR = new Msg("PathField.PathEditor"); //$NON-NLS-1$
+ static final Msg NEW_CLASS = new Msg("StringArrayField.NewClass"); //$NON-NLS-1$
+ static final Msg BASIC = new Msg("TabbedConfigEditor.Basic"); //$NON-NLS-1$
+ static final Msg SELECT_SUBNODE = new Msg("TreeConfigEditor.SelectSubnode"); //$NON-NLS-1$
+ static final Msg PROPERTIES = new Msg("WizardConfigEditor.Properties"); //$NON-NLS-1$
+ static final Msg PROPERTIES_POSN = new Msg("WizardConfigEditor.PropertiesPosn"); //$NON-NLS-1$
+
+ /**
+ * Passthrough ctor
+ */
+ private Msg(String name)
+ {
+ super(name);
+ }
+}
Copied: trunk/jsword-limbo/src/main/java/org/crosswire/common/util/ThreadUtil.java (from rev 1143, trunk/common/src/main/java/org/crosswire/common/util/ThreadUtil.java)
Property changes on: trunk/jsword-limbo/src/main/java/org/crosswire/common/util/ThreadUtil.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Modified: trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/jdbc/JDBCBook.java
===================================================================
--- trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/jdbc/JDBCBook.java 2006-10-10 23:33:39 UTC (rev 1154)
+++ trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/jdbc/JDBCBook.java 2006-10-10 23:34:40 UTC (rev 1155)
@@ -37,7 +37,6 @@
import org.crosswire.common.util.Logger;
import org.crosswire.jsword.book.BookDriver;
import org.crosswire.jsword.book.BookException;
-import org.crosswire.jsword.book.BookMetaData;
import org.crosswire.jsword.book.basic.AbstractPassageBook;
import org.crosswire.jsword.book.basic.DefaultBookMetaData;
import org.crosswire.jsword.book.filter.Filter;
@@ -61,9 +60,10 @@
*/
public JDBCBook(BookDriver driver, Properties prop) throws BookException
{
- BookMetaData bmd = new DefaultBookMetaData(driver, this, prop);
- setBookMetaData(bmd);
+ super(null); // set BookMetaData later
+ setBookMetaData(new DefaultBookMetaData(driver, this, prop));
+
Map props = getProperties();
// Load the specified JDBC name
Modified: trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/raw/RawBook.java
===================================================================
--- trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/raw/RawBook.java 2006-10-10 23:33:39 UTC (rev 1154)
+++ trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/raw/RawBook.java 2006-10-10 23:34:40 UTC (rev 1155)
@@ -32,7 +32,6 @@
import org.crosswire.jsword.book.BookData;
import org.crosswire.jsword.book.BookDriver;
import org.crosswire.jsword.book.BookException;
-import org.crosswire.jsword.book.BookMetaData;
import org.crosswire.jsword.book.CaseType;
import org.crosswire.jsword.book.OSISUtil;
import org.crosswire.jsword.book.SentenceUtil;
@@ -215,8 +214,8 @@
*/
public RawBook(BookDriver driver, Map prop, URL url)
{
- BookMetaData bmd = new DefaultBookMetaData(driver, this, prop);
- setBookMetaData(bmd);
+ super(null); // set the BookMetaData later
+ setBookMetaData(new DefaultBookMetaData(driver, this, prop));
this.url = url;
Modified: trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/remote/RemoteBook.java
===================================================================
--- trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/remote/RemoteBook.java 2006-10-10 23:33:39 UTC (rev 1154)
+++ trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/remote/RemoteBook.java 2006-10-10 23:34:40 UTC (rev 1155)
@@ -27,7 +27,6 @@
import org.crosswire.jsword.book.BookCategory;
import org.crosswire.jsword.book.BookData;
import org.crosswire.jsword.book.BookException;
-import org.crosswire.jsword.book.BookMetaData;
import org.crosswire.jsword.book.basic.AbstractBook;
import org.crosswire.jsword.book.basic.DefaultBookMetaData;
import org.crosswire.jsword.passage.Key;
@@ -56,8 +55,7 @@
*/
public RemoteBook(Remoter remoter, RemoteBookDriver driver, String name, BookCategory type)
{
- BookMetaData bmd = new DefaultBookMetaData(driver, name, type);
- setBookMetaData(bmd);
+ super(new DefaultBookMetaData(driver, name, type));
this.remoter = remoter;
this.driver = driver;
Modified: trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/ser/SerBook.java
===================================================================
--- trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/ser/SerBook.java 2006-10-10 23:33:39 UTC (rev 1154)
+++ trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/ser/SerBook.java 2006-10-10 23:34:40 UTC (rev 1155)
@@ -26,7 +26,6 @@
import org.crosswire.jsword.book.BookDriver;
import org.crosswire.jsword.book.BookException;
-import org.crosswire.jsword.book.BookMetaData;
import org.crosswire.jsword.book.basic.AbstractPassageBook;
import org.crosswire.jsword.book.basic.DefaultBookMetaData;
import org.crosswire.jsword.book.filter.Filter;
@@ -150,8 +149,8 @@
*/
public SerBook(BookDriver driver, Properties prop, URL url) throws BookException
{
- BookMetaData bmd = new DefaultBookMetaData(driver, this, prop);
- setBookMetaData(bmd);
+ super(null); // set the BookMetaData later
+ setBookMetaData(new DefaultBookMetaData(driver, this, prop));
try
{
Modified: trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/stub/StubBook.java
===================================================================
--- trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/stub/StubBook.java 2006-10-10 23:33:39 UTC (rev 1154)
+++ trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/stub/StubBook.java 2006-10-10 23:34:40 UTC (rev 1155)
@@ -23,7 +23,6 @@
import org.crosswire.jsword.book.BookCategory;
import org.crosswire.jsword.book.BookException;
-import org.crosswire.jsword.book.BookMetaData;
import org.crosswire.jsword.book.basic.AbstractPassageBook;
import org.crosswire.jsword.book.basic.DefaultBookMetaData;
import org.crosswire.jsword.book.filter.Filter;
@@ -46,8 +45,7 @@
*/
public StubBook(StubBookDriver driver, String name, BookCategory type)
{
- BookMetaData bmd = new DefaultBookMetaData(driver, name, type);
- setBookMetaData(bmd);
+ super(new DefaultBookMetaData(driver, name, type));
}
/* (non-Javadoc)
Modified: trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/stub/StubDictionary.java
===================================================================
--- trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/stub/StubDictionary.java 2006-10-10 23:33:39 UTC (rev 1154)
+++ trunk/jsword-limbo/src/main/java/org/crosswire/jsword/book/stub/StubDictionary.java 2006-10-10 23:34:40 UTC (rev 1155)
@@ -26,7 +26,6 @@
import org.crosswire.jsword.book.BookCategory;
import org.crosswire.jsword.book.BookData;
import org.crosswire.jsword.book.BookException;
-import org.crosswire.jsword.book.BookMetaData;
import org.crosswire.jsword.book.OSISUtil;
import org.crosswire.jsword.book.basic.AbstractBook;
import org.crosswire.jsword.book.basic.DefaultBookMetaData;
@@ -51,8 +50,7 @@
*/
public StubDictionary(StubBookDriver driver, String name, BookCategory type)
{
- BookMetaData bmd = new DefaultBookMetaData(driver, name, type);
- setBookMetaData(bmd);
+ super(new DefaultBookMetaData(driver, name, type));
}
/* (non-Javadoc)
Copied: trunk/jsword-limbo/src/test/java/org/crosswire/common/util/ThreadUtilTest.java (from rev 1143, trunk/common/src/test/java/org/crosswire/common/util/ThreadUtilTest.java)
Property changes on: trunk/jsword-limbo/src/test/java/org/crosswire/common/util/ThreadUtilTest.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
More information about the jsword-svn
mailing list