Commit 10590d37 by Ito Kazumitsu Committed by Michael Koch

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
parent 3c22b666
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.
......
......@@ -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 == '\'') {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment