[patch] Fix boolean support for "y", as used by torque

Scott Eade <[email protected]> Mon, 25 Aug 2003 16:20:21 +1000
Newsgroups gmane.comp.db.village.devel
Message-ID <[email protected]>
The patch below provides for "y" as a true value - this is the
value used by torque.

I have tested this locally using the torque runtime tests - I
wrote a new test case to highlight this problem.

Cheers,

Scott

-- 
Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au


Index: Value.java
===================================================================
RCS file: /home/cvspublic/village/com/workingdogs/village/Value.java,v
retrieving revision 1.19
diff -u -r1.19 Value.java
--- Value.java    25 Jun 2003 15:28:05 -0000    1.19
+++ Value.java    25 Aug 2003 06:16:01 -0000
@@ -1203,13 +1203,14 @@
     }
    
     /**
-     * @return true if (true || t | yes | 1)
+     * @return true if (true | t | yes | y | 1)
      */
     private boolean isTrue(String value)
     {
         return (value.equalsIgnoreCase ("true") ||
                 value.equalsIgnoreCase ("t") ||
                 value.equalsIgnoreCase ("yes") ||
+                value.equalsIgnoreCase ("y") ||
                 value.equals ("1"));
     }
 }