[jsword-svn] r1582 - trunk/common/src/main/java/org/crosswire/common/util

dmsmith at www.crosswire.org dmsmith at www.crosswire.org
Mon Jul 30 08:37:11 MST 2007


Author: dmsmith
Date: 2007-07-30 08:37:11 -0700 (Mon, 30 Jul 2007)
New Revision: 1582

Modified:
   trunk/common/src/main/java/org/crosswire/common/util/Convert.java
Log:
minor improvement to boolean conversion

Modified: trunk/common/src/main/java/org/crosswire/common/util/Convert.java
===================================================================
--- trunk/common/src/main/java/org/crosswire/common/util/Convert.java	2007-07-30 14:57:01 UTC (rev 1581)
+++ trunk/common/src/main/java/org/crosswire/common/util/Convert.java	2007-07-30 15:37:11 UTC (rev 1582)
@@ -48,7 +48,7 @@
      */
     public static boolean string2Boolean(String data)
     {
-        if (data.equalsIgnoreCase("true")) //$NON-NLS-1$
+        if (Boolean.valueOf(data).booleanValue())
         {
             return true;
         }
@@ -83,7 +83,7 @@
      */
     public static String boolean2String(boolean data)
     {
-        return data ? "True" : "False"; //$NON-NLS-1$ //$NON-NLS-2$
+        return Boolean.toString(data);
     }
 
     /**




More information about the jsword-svn mailing list