OSDN Git Service

2003-12-02 Ito Kazumitsu <kaz@maczuka.gcd.org>
authormkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 2 Dec 2003 16:15:15 +0000 (16:15 +0000)
committermkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 2 Dec 2003 16:15:15 +0000 (16:15 +0000)
* java/text/SimpleDateFormat.java (compileFormat):
isLowerCase() and isUpperCase() allow too many characters.
Just use >= 'A' && <= 'Z' || >= 'a' && <= 'z'.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74188 138bc75d-0d04-0410-961f-82ee72b054a4

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

index b2a224b..05b9237 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 88aaf41..89f84dd 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 == '\'') {