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 == '\'') {