From 9252ac1ef394759b2821dd66e071adf06e638a0b Mon Sep 17 00:00:00 2001 From: mkoch Date: Tue, 2 Dec 2003 16:15:15 +0000 Subject: [PATCH] 2003-12-02 Ito Kazumitsu * 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 | 6 ++++++ libjava/java/text/SimpleDateFormat.java | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) 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 == '\'') { -- 2.11.4.GIT