[jsword-svn] r1842 - in trunk: bibledesktop/src/main/java/org/crosswire/bibledesktop/book bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop bibledesktop/src/main/java/org/crosswire/bibledesktop/display/basic common/src/main/java/org/crosswire/common/config common/src/main/java/org/crosswire/common/icu common/src/main/java/org/crosswire/common/util common/src/main/java/org/crosswire/common/xml common-swing/src/main/java/org/crosswire/common/swing jsword/src/main/java/org/crosswire/jsword/index/lucene/analysis

dmsmith at www.crosswire.org dmsmith at www.crosswire.org
Thu May 8 13:19:23 MST 2008


Author: dmsmith
Date: 2008-05-08 13:19:22 -0700 (Thu, 08 May 2008)
New Revision: 1842

Modified:
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/Msg.properties
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/Msg_vi.properties
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/Msg_zh.properties
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/Msg_zh_CN.properties
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/DesktopActions.java
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/basic/TextPaneBookDataDisplay.java
   trunk/common-swing/src/main/java/org/crosswire/common/swing/LookAndFeelUtil.java
   trunk/common/src/main/java/org/crosswire/common/config/AbstractReflectedChoice.java
   trunk/common/src/main/java/org/crosswire/common/config/ChoiceFactory.java
   trunk/common/src/main/java/org/crosswire/common/config/ClassChoice.java
   trunk/common/src/main/java/org/crosswire/common/icu/DateFormatter.java
   trunk/common/src/main/java/org/crosswire/common/util/ClassUtil.java
   trunk/common/src/main/java/org/crosswire/common/util/Convert.java
   trunk/common/src/main/java/org/crosswire/common/util/EventListenerList.java
   trunk/common/src/main/java/org/crosswire/common/util/PluginUtil.java
   trunk/common/src/main/java/org/crosswire/common/util/ReflectionUtil.java
   trunk/common/src/main/java/org/crosswire/common/util/StackTrace.java
   trunk/common/src/main/java/org/crosswire/common/xml/XMLProcess.java
   trunk/common/src/main/java/org/crosswire/common/xml/XalanProcess.java
   trunk/jsword/src/main/java/org/crosswire/jsword/index/lucene/analysis/AnalyzerFactory.java
Log:
Fixed a misspelling and improved reflection code.

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/Msg.properties
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/Msg.properties	2008-05-08 05:33:20 UTC (rev 1841)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/Msg.properties	2008-05-08 20:19:22 UTC (rev 1842)
@@ -42,7 +42,7 @@
 	All Prophecy (Deu 28, Isa-Mal, Rev)|\
 	Old Testament (Gen-Mal)|\
 	New Testament (Mat-Rev)|\
-	The Penteteuch (Gen-Deu)|\
+	The Pentateuch (Gen-Deu)|\
 	History (Josh-Est)|\
 	Poetry (Job-Song)|\
 	Major Prophets (Isa-Dan)|\

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/Msg_vi.properties
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/Msg_vi.properties	2008-05-08 05:33:20 UTC (rev 1841)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/Msg_vi.properties	2008-05-08 20:19:22 UTC (rev 1842)
@@ -72,7 +72,7 @@
 	T\u00E2n \u01AF\u1EDBc (Mat\u002DRev)|\
 #	New Testament (Mat\u002DRev)|\
 	Ng\u0169 Kinh (Gen\u002DDeu)|\
-#	The Penteteuch (Gen\u002DDeu)|\
+#	The Pentateuch (Gen\u002DDeu)|\
 	S\u00E1ch L\u1ECBch S\u1EED (Josh\u002DEst)|\
 #	History (Josh\u002DEst)|\
 	S\u00E1ch Th\u01A1 Ca (Job\u002DSong)|\

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/Msg_zh.properties
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/Msg_zh.properties	2008-05-08 05:33:20 UTC (rev 1841)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/Msg_zh.properties	2008-05-08 20:19:22 UTC (rev 1842)
@@ -2,7 +2,7 @@
 #Wed Dec 26 09:54:34 CST 2007
 AdvancedSearchPane.PresetEnd=)
 AdvancedSearchPane.PresetStart=(
-AdvancedSearchPane.Presets=The Whole Bible|All Prophecy (Deu 28, Isa-Mal, Rev)|Old Testament (Gen-Mal)|New Testament (Mat-Rev)|The Penteteuch (Gen-Deu)|History (Josh-Est)|Poetry (Job-Song)|Major Prophets (Isa-Dan)|Minor Prophets (Hos-Mal)|Gospels and Acts (Mat-Act)|Letters to People (Rom-Heb)|Letters from People (Jam-Jude)|Custom
+AdvancedSearchPane.Presets=The Whole Bible|All Prophecy (Deu 28, Isa-Mal, Rev)|Old Testament (Gen-Mal)|New Testament (Mat-Rev)|The Pentateuch (Gen-Deu)|History (Josh-Est)|Poetry (Job-Song)|Major Prophets (Isa-Dan)|Minor Prophets (Hos-Mal)|Gospels and Acts (Mat-Act)|Letters to People (Rom-Heb)|Letters from People (Jam-Jude)|Custom
 AdvancedSearchPane.Rank=\u986F\u793A {0} \u7D93\u7BC0\:
 AdvancedSearchPane.RankOne=\u986F\u793A\u8F03\u597D\u6216\u559C\u611B\u7684\u7D93\u7BC0\:
 AdvancedSearchPane.SelectPassageTitle=\u689D\u4EF6\u5F0F\u4E3B\u984C\u95B1\u8B80

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/Msg_zh_CN.properties
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/Msg_zh_CN.properties	2008-05-08 05:33:20 UTC (rev 1841)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/Msg_zh_CN.properties	2008-05-08 20:19:22 UTC (rev 1842)
@@ -2,7 +2,7 @@
 #Fri Dec 28 14:11:01 CST 2007
 AdvancedSearchPane.PresetEnd=)
 AdvancedSearchPane.PresetStart=(
-AdvancedSearchPane.Presets=The Whole Bible|All Prophecy (Deu 28, Isa-Mal, Rev)|Old Testament (Gen-Mal)|New Testament (Mat-Rev)|The Penteteuch (Gen-Deu)|History (Josh-Est)|Poetry (Job-Song)|Major Prophets (Isa-Dan)|Minor Prophets (Hos-Mal)|Gospels and Acts (Mat-Act)|Letters to People (Rom-Heb)|Letters from People (Jam-Jude)|Custom
+AdvancedSearchPane.Presets=The Whole Bible|All Prophecy (Deu 28, Isa-Mal, Rev)|Old Testament (Gen-Mal)|New Testament (Mat-Rev)|The Pentateuch (Gen-Deu)|History (Josh-Est)|Poetry (Job-Song)|Major Prophets (Isa-Dan)|Minor Prophets (Hos-Mal)|Gospels and Acts (Mat-Act)|Letters to People (Rom-Heb)|Letters from People (Jam-Jude)|Custom
 AdvancedSearchPane.Rank=\u663E\u793A {0} \u7ECF\u8282\:
 AdvancedSearchPane.RankOne=\u663E\u793A\u8F83\u597D\u6216\u8F83\u559C\u7231\u7684\u7ECF\u8282\:
 AdvancedSearchPane.SelectPassageTitle=\u6761\u4EF6\u5F0F\u4E3B\u9898\u9605\u8BFB

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/DesktopActions.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/DesktopActions.java	2008-05-08 05:33:20 UTC (rev 1841)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/DesktopActions.java	2008-05-08 20:19:22 UTC (rev 1842)
@@ -42,6 +42,7 @@
 import org.crosswire.common.swing.ActionFactory;
 import org.crosswire.common.swing.Actionable;
 import org.crosswire.common.swing.desktop.ViewVisitor;
+import org.crosswire.common.util.ClassUtil;
 import org.crosswire.common.util.Logger;
 import org.crosswire.common.util.OSType;
 import org.crosswire.common.util.ReflectionUtil;
@@ -503,7 +504,7 @@
         {
             try
             {
-                Class osxAdapter = Class.forName("org.crosswire.common.aqua.OSXAdapter"); //$NON-NLS-1$
+                Class osxAdapter = ClassUtil.forName("org.crosswire.common.aqua.OSXAdapter"); //$NON-NLS-1$
                 Object[] registerOSXArgs = { actions, DesktopActions.ABOUT, DesktopActions.OPTIONS, DesktopActions.EXIT };
                 ReflectionUtil.invoke(osxAdapter, osxAdapter, "registerMacOSXApplication", registerOSXArgs); //$NON-NLS-1$
 

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/basic/TextPaneBookDataDisplay.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/basic/TextPaneBookDataDisplay.java	2008-05-08 05:33:20 UTC (rev 1841)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/basic/TextPaneBookDataDisplay.java	2008-05-08 20:19:22 UTC (rev 1842)
@@ -161,7 +161,7 @@
             XSLTProperty.DIRECTION.setState(bmd.isLeftToRight() ? "ltr" : "rtl"); //$NON-NLS-1$ //$NON-NLS-2$
 
             URI loc = bmd.getLocation();
-            XSLTProperty.BASE_URL.setState(loc == null ? "" : NetUtil.getAsFile(loc).getCanonicalPath()); //$NON-NLS-1$
+            XSLTProperty.BASE_URL.setState(loc == null ? "" : NetUtil.getAsFile(loc).toURL().toString()); //$NON-NLS-1$
 
             if (bmd.getBookCategory() == BookCategory.BIBLE)
             {

Modified: trunk/common/src/main/java/org/crosswire/common/config/AbstractReflectedChoice.java
===================================================================
--- trunk/common/src/main/java/org/crosswire/common/config/AbstractReflectedChoice.java	2008-05-08 05:33:20 UTC (rev 1841)
+++ trunk/common/src/main/java/org/crosswire/common/config/AbstractReflectedChoice.java	2008-05-08 20:19:22 UTC (rev 1842)
@@ -26,6 +26,7 @@
 import java.util.MissingResourceException;
 import java.util.ResourceBundle;
 
+import org.crosswire.common.util.ClassUtil;
 import org.crosswire.common.util.Logger;
 import org.crosswire.common.util.StringUtil;
 import org.jdom.Element;
@@ -123,7 +124,7 @@
 
         try
         {
-            clazz = Class.forName(clazzname);
+            clazz = ClassUtil.forName(clazzname);
         }
         catch (ClassNotFoundException ex)
         {

Modified: trunk/common/src/main/java/org/crosswire/common/config/ChoiceFactory.java
===================================================================
--- trunk/common/src/main/java/org/crosswire/common/config/ChoiceFactory.java	2008-05-08 05:33:20 UTC (rev 1841)
+++ trunk/common/src/main/java/org/crosswire/common/config/ChoiceFactory.java	2008-05-08 20:19:22 UTC (rev 1842)
@@ -25,6 +25,7 @@
 import java.util.Map;
 import java.util.ResourceBundle;
 
+import org.crosswire.common.util.ClassUtil;
 import org.crosswire.common.util.PluginUtil;
 import org.jdom.Element;
 
@@ -57,7 +58,7 @@
         if ("custom".equals(type)) //$NON-NLS-1$
         {
             String clazzstr = option.getAttributeValue("class"); //$NON-NLS-1$
-            clazz = Class.forName(clazzstr);
+            clazz = ClassUtil.forName(clazzstr);
         }
         else
         {

Modified: trunk/common/src/main/java/org/crosswire/common/config/ClassChoice.java
===================================================================
--- trunk/common/src/main/java/org/crosswire/common/config/ClassChoice.java	2008-05-08 05:33:20 UTC (rev 1841)
+++ trunk/common/src/main/java/org/crosswire/common/config/ClassChoice.java	2008-05-08 20:19:22 UTC (rev 1842)
@@ -21,6 +21,7 @@
  */
 package org.crosswire.common.config;
 
+import org.crosswire.common.util.ClassUtil;
 import org.crosswire.common.util.Logger;
 
 /**
@@ -62,7 +63,7 @@
     {
         try
         {
-            return Class.forName(orig);
+            return ClassUtil.forName(orig);
         }
         catch (ClassNotFoundException ex)
         {

Modified: trunk/common/src/main/java/org/crosswire/common/icu/DateFormatter.java
===================================================================
--- trunk/common/src/main/java/org/crosswire/common/icu/DateFormatter.java	2008-05-08 05:33:20 UTC (rev 1841)
+++ trunk/common/src/main/java/org/crosswire/common/icu/DateFormatter.java	2008-05-08 20:19:22 UTC (rev 1842)
@@ -27,6 +27,7 @@
 import java.text.SimpleDateFormat;
 import java.util.Date;
 
+import org.crosswire.common.util.ClassUtil;
 import org.crosswire.common.util.ReflectionUtil;
 
 /**
@@ -55,7 +56,7 @@
         DateFormatter fmt = new DateFormatter();
         try
         {
-            fmt.formatterClass = Class.forName("com.ibm.icu.text.DateFormat"); //$NON-NLS-1$
+            fmt.formatterClass = ClassUtil.forName("com.ibm.icu.text.DateFormat"); //$NON-NLS-1$
             // To call a method taking a type of int, the type has to match but the object has to be wrapped
             Class[] instanceTypes = { int.class };
             Object[] instanceParams = { new Integer(format) };
@@ -85,7 +86,7 @@
         DateFormatter fmt = new DateFormatter();
         try
         {
-            fmt.formatterClass = Class.forName("com.ibm.icu.text.SimpleDateFormat"); //$NON-NLS-1$
+            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$
         }

Modified: trunk/common/src/main/java/org/crosswire/common/util/ClassUtil.java
===================================================================
--- trunk/common/src/main/java/org/crosswire/common/util/ClassUtil.java	2008-05-08 05:33:20 UTC (rev 1841)
+++ trunk/common/src/main/java/org/crosswire/common/util/ClassUtil.java	2008-05-08 20:19:22 UTC (rev 1842)
@@ -43,6 +43,18 @@
     }
 
     /**
+     * Gets the Class for the className in a way that works well for extensions.
+     * See: http://www.javageeks.com/Papers/ClassForName/ClassForName.pdf
+     * @param className the class to get
+     * @return the found Class
+     * @throws ClassNotFoundException
+     */
+    public static Class forName(String className) throws ClassNotFoundException
+    {
+      return Thread.currentThread().getContextClassLoader().loadClass(className);
+    }
+
+    /**
      * This function finds the first matching filename for a Java class
      * file from the classpath, if none is found it returns null.
      */

Modified: trunk/common/src/main/java/org/crosswire/common/util/Convert.java
===================================================================
--- trunk/common/src/main/java/org/crosswire/common/util/Convert.java	2008-05-08 05:33:20 UTC (rev 1841)
+++ trunk/common/src/main/java/org/crosswire/common/util/Convert.java	2008-05-08 20:19:22 UTC (rev 1842)
@@ -120,7 +120,7 @@
      */
     public static Object string2Object(String data) throws InstantiationException, ClassNotFoundException, IllegalAccessException
     {
-        return Class.forName(data).newInstance();
+        return ClassUtil.forName(data).newInstance();
     }
 
     /**
@@ -140,7 +140,7 @@
      */
     public static Class string2Class(String data) throws ClassNotFoundException
     {
-        return Class.forName(data);
+        return ClassUtil.forName(data);
     }
 
     /**
@@ -172,7 +172,7 @@
                 int equ_pos = entry.indexOf('=');
                 String key = entry.substring(0, equ_pos);
                 String value = entry.substring(equ_pos + 1);
-                Class clazz = Class.forName(value);
+                Class clazz = ClassUtil.forName(value);
 
                 if (clazz.isAssignableFrom(superclass))
                 {

Modified: trunk/common/src/main/java/org/crosswire/common/util/EventListenerList.java
===================================================================
--- trunk/common/src/main/java/org/crosswire/common/util/EventListenerList.java	2008-05-08 05:33:20 UTC (rev 1841)
+++ trunk/common/src/main/java/org/crosswire/common/util/EventListenerList.java	2008-05-08 20:19:22 UTC (rev 1842)
@@ -318,7 +318,7 @@
             }
 
             EventListener li = (EventListener) ois.readObject();
-            add(Class.forName((String) listenerTypeOrNull), li);
+            add(ClassUtil.forName((String) listenerTypeOrNull), li);
         }
     }
 

Modified: trunk/common/src/main/java/org/crosswire/common/util/PluginUtil.java
===================================================================
--- trunk/common/src/main/java/org/crosswire/common/util/PluginUtil.java	2008-05-08 05:33:20 UTC (rev 1841)
+++ trunk/common/src/main/java/org/crosswire/common/util/PluginUtil.java	2008-05-08 20:19:22 UTC (rev 1842)
@@ -70,7 +70,7 @@
                 try
                 {
                     String name = (String) it.next();
-                    Class impl = Class.forName(name);
+                    Class impl = ClassUtil.forName(name);
                     if (clazz.isAssignableFrom(impl))
                     {
                         matches.add(impl);
@@ -121,7 +121,7 @@
                 {
                     String key = (String) it.next();
                     String value = props.getProperty(key);
-                    Class impl = Class.forName(value);
+                    Class impl = ClassUtil.forName(value);
                     if (clazz.isAssignableFrom(impl))
                     {
                         matches.put(key, impl);
@@ -165,7 +165,7 @@
         Properties props = getPlugin(clazz);
         String name = props.getProperty(DEFAULT);
 
-        Class impl = Class.forName(name);
+        Class impl = ClassUtil.forName(name);
         if (!clazz.isAssignableFrom(impl))
         {
             throw new ClassCastException(Msg.NOT_ASSIGNABLE.toString(new Object[] { impl.getName(), clazz.getName() }));

Modified: trunk/common/src/main/java/org/crosswire/common/util/ReflectionUtil.java
===================================================================
--- trunk/common/src/main/java/org/crosswire/common/util/ReflectionUtil.java	2008-05-08 05:33:20 UTC (rev 1841)
+++ trunk/common/src/main/java/org/crosswire/common/util/ReflectionUtil.java	2008-05-08 20:19:22 UTC (rev 1842)
@@ -54,7 +54,7 @@
      */
     public static Object construct(String className) throws ClassNotFoundException, InstantiationException, IllegalAccessException
     {
-        Class clazz = Class.forName(className);
+        Class clazz = ClassUtil.forName(className);
         return clazz.newInstance();
     }
 
@@ -74,7 +74,7 @@
     public static Object construct(String className, Object[] params) throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException
     {
         Class[] paramTypes = describeParameters(params);
-        Class clazz = Class.forName(className);
+        Class clazz = ClassUtil.forName(className);
         final Constructor c = clazz.getConstructor(paramTypes);
         return c.newInstance(params);
     }
@@ -99,7 +99,7 @@
         {
             calledTypes = describeParameters(params);
         }
-        Class clazz = Class.forName(className);
+        Class clazz = ClassUtil.forName(className);
         final Constructor c = clazz.getConstructor(calledTypes);
         return c.newInstance(params);
     }
@@ -129,7 +129,7 @@
         int lastDot = call.lastIndexOf('.');
         String className = call.substring(0, lastDot);
         String methodName = call.substring(lastDot + 1);
-        Class clazz = Class.forName(className);
+        Class clazz = ClassUtil.forName(className);
         return invoke(clazz, clazz, methodName, params);
     }
 

Modified: trunk/common/src/main/java/org/crosswire/common/util/StackTrace.java
===================================================================
--- trunk/common/src/main/java/org/crosswire/common/util/StackTrace.java	2008-05-08 05:33:20 UTC (rev 1841)
+++ trunk/common/src/main/java/org/crosswire/common/util/StackTrace.java	2008-05-08 20:19:22 UTC (rev 1842)
@@ -192,7 +192,7 @@
     {
         try
         {
-            return Class.forName(classNames[level]);
+            return ClassUtil.forName(classNames[level]);
         }
         catch (ClassNotFoundException ex)
         {

Modified: trunk/common/src/main/java/org/crosswire/common/xml/XMLProcess.java
===================================================================
--- trunk/common/src/main/java/org/crosswire/common/xml/XMLProcess.java	2008-05-08 05:33:20 UTC (rev 1841)
+++ trunk/common/src/main/java/org/crosswire/common/xml/XMLProcess.java	2008-05-08 20:19:22 UTC (rev 1842)
@@ -23,6 +23,7 @@
 
 import java.io.IOException;
 
+import org.crosswire.common.util.ClassUtil;
 import org.xml.sax.SAXException;
 import org.xml.sax.XMLReader;
 import org.xml.sax.helpers.XMLReaderFactory;
@@ -168,7 +169,7 @@
 
         try
         {
-            adapter = (XMLHandlerAdapter) Class.forName(adapterName).newInstance();
+            adapter = (XMLHandlerAdapter) ClassUtil.forName(adapterName).newInstance();
         }
         catch (ClassNotFoundException e)
         {

Modified: trunk/common/src/main/java/org/crosswire/common/xml/XalanProcess.java
===================================================================
--- trunk/common/src/main/java/org/crosswire/common/xml/XalanProcess.java	2008-05-08 05:33:20 UTC (rev 1841)
+++ trunk/common/src/main/java/org/crosswire/common/xml/XalanProcess.java	2008-05-08 20:19:22 UTC (rev 1842)
@@ -24,6 +24,8 @@
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 
+import org.crosswire.common.util.ClassUtil;
+
 /**
  * Allows xalan's xslt process class to be invoked as a command line
  * application. Java 5 has renamed the main routine to _main. This class
@@ -53,7 +55,7 @@
         try
         {
             // Try for 1.4.x
-            clazz = Class.forName("org.apache.xalan.xslt.Process"); //$NON-NLS-1$
+            clazz = ClassUtil.forName("org.apache.xalan.xslt.Process"); //$NON-NLS-1$
             main = clazz.getMethod("main", new Class[] {String[].class}); //$NON-NLS-1$
         }
         catch (ClassNotFoundException e)
@@ -61,7 +63,7 @@
             try
             {
                 // Try for 1.5.x
-                clazz = Class.forName("com.sun.org.apache.xalan.internal.xslt.Process"); //$NON-NLS-1$
+                clazz = ClassUtil.forName("com.sun.org.apache.xalan.internal.xslt.Process"); //$NON-NLS-1$
                 main = clazz.getMethod("_main", new Class[] {String[].class}); //$NON-NLS-1$
             }
             catch (ClassNotFoundException e1)

Modified: trunk/common-swing/src/main/java/org/crosswire/common/swing/LookAndFeelUtil.java
===================================================================
--- trunk/common-swing/src/main/java/org/crosswire/common/swing/LookAndFeelUtil.java	2008-05-08 05:33:20 UTC (rev 1841)
+++ trunk/common-swing/src/main/java/org/crosswire/common/swing/LookAndFeelUtil.java	2008-05-08 20:19:22 UTC (rev 1842)
@@ -33,6 +33,7 @@
 import org.crosswire.common.swing.plaf.MetalLFCustoms;
 import org.crosswire.common.swing.plaf.OtherLFCustoms;
 import org.crosswire.common.swing.plaf.WindowsLFCustoms;
+import org.crosswire.common.util.ClassUtil;
 
 /**
  * LookAndFeelUtil declares the Choices and actions
@@ -178,7 +179,7 @@
                 // UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel"); //$NON-NLS-1$
                 // UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel");
                 // UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel");
-                defaultLAF = Class.forName(systemLAF);
+                defaultLAF = ClassUtil.forName(systemLAF);
             }
         }
         catch (ClassNotFoundException e)

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/index/lucene/analysis/AnalyzerFactory.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/index/lucene/analysis/AnalyzerFactory.java	2008-05-08 05:33:20 UTC (rev 1841)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/index/lucene/analysis/AnalyzerFactory.java	2008-05-08 20:19:22 UTC (rev 1842)
@@ -24,6 +24,7 @@
 import java.io.IOException;
 import java.util.Properties;
 
+import org.crosswire.common.util.ClassUtil;
 import org.crosswire.common.util.Logger;
 import org.crosswire.common.util.ResourceUtil;
 
@@ -64,7 +65,7 @@
             {
                 try
                 {
-                    Class impl = Class.forName(aClass);
+                    Class impl = ClassUtil.forName(aClass);
 
                     newObject = (AbstractAnalyzer) impl.newInstance();
                 }




More information about the jsword-svn mailing list