From: Ito Kazumitsu Date: Tue, 2 Dec 2003 16:15:15 +0000 (+0000) Subject: SimpleDateFormat.java (compileFormat): isLowerCase() and isUpperCase() allow too... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=10590d375b68a8e1fb8b663aa04c58c4306a489f;p=gcc.git SimpleDateFormat.java (compileFormat): isLowerCase() and isUpperCase() allow too many characters. 2003-12-02 Ito Kazumitsu * java/text/SimpleDateFormat.java (compileFormat): isLowerCase() and isUpperCase() allow too many characters. Just use >= 'A' && <= 'Z' || >= 'a' && <= 'z'. From-SVN: r74188 --- diff --git a/libjava/ChangeLog b/libjava/ChangeLog index b2a224b7a8a..05b92374852 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,9 @@ +2003-12-02 Ito Kazumitsu + + * java/text/SimpleDateFormat.java (compileFormat): + isLowerCase() and isUpperCase() allow too many characters. + Just use >= 'A' && <= 'Z' || >= 'a' && <= 'z'. + 2003-12-02 Dalibor Topic * java/text/FieldPosition.java (equals): Fixed comment. diff --git a/libjava/java/text/SimpleDateFormat.java b/libjava/java/text/SimpleDateFormat.java index 88aaf41f9bd..89f84dde5c6 100644 --- a/libjava/java/text/SimpleDateFormat.java +++ b/libjava/java/text/SimpleDateFormat.java @@ -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 == '\'') {