SimpleDateFormat.java (compileFormat): isLowerCase() and isUpperCase() allow too...
authorIto Kazumitsu <kaz@maczuka.gcd.org>
Tue, 2 Dec 2003 16:15:15 +0000 (16:15 +0000)
committerMichael Koch <mkoch@gcc.gnu.org>
Tue, 2 Dec 2003 16:15:15 +0000 (16:15 +0000)
2003-12-02  Ito Kazumitsu  <kaz@maczuka.gcd.org>

* java/text/SimpleDateFormat.java (compileFormat):
isLowerCase() and isUpperCase() allow too many characters.
Just use >= 'A' && <= 'Z' || >= 'a' && <= 'z'.

From-SVN: r74188

libjava/ChangeLog
libjava/java/text/SimpleDateFormat.java

index b2a224b7a8a8a9141a3b87437383cbaa7b79b854..05b92374852d215160521bcf45a1c62def02a1c6 100644 (file)
@@ -1,3 +1,9 @@
+2003-12-02  Ito Kazumitsu  <kaz@maczuka.gcd.org>
+
+       * java/text/SimpleDateFormat.java (compileFormat):
+       isLowerCase() and isUpperCase() allow too many characters.
+       Just use >= 'A' && <= 'Z' || >= 'a' && <= 'z'.
+
 2003-12-02  Dalibor Topic <robilad@kaffe.org>
 
        * java/text/FieldPosition.java (equals): Fixed comment.
index 88aaf41f9bda9e4e0a5b1354179b947bdab5d4e4..89f84dde5c6a00596426e38f7ca00d1edd4cfa19 100644 (file)
@@ -117,8 +117,8 @@ public class SimpleDateFormat extends DateFormat
       field = formatData.getLocalPatternChars().indexOf(thisChar);
       if (field == -1) {
        current = null;
-       if (Character.isLowerCase (thisChar)
-           || Character.isUpperCase (thisChar)) {
+       if ((thisChar >= 'A' && thisChar <= 'Z')
+           || (thisChar >= 'a' && thisChar <= 'z')) {
          // Not a valid letter
          tokens.add(new FieldSizePair(-1,0));
        } else if (thisChar == '\'') {