SimpleDateFormat.java (compileFormat): isLowerCase() and isUpperCase() allow too many characters.

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
This commit is contained in:
Ito Kazumitsu 2003-12-02 16:15:15 +00:00 committed by Michael Koch
parent 3c22b666f5
commit 10590d375b
2 changed files with 8 additions and 2 deletions

View 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.

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