Name: rmT116609 Date: 02/05/2004
FULL PRODUCT VERSION :
java version "1.5.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b31)
Java HotSpot(TM) Client VM (build 1.5.0-beta-b31, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows 2000 [Version 5.00.2195]
A DESCRIPTION OF THE PROBLEM :
The docs for java.util.Formatter (http://java.sun.com/j2se/1.5.0/docs/api/java/util/Formatter.html) say:
'p' Locale-specific morning or afternoon marker in upper case, e.g."AM" or "PM".
'P' Locale-specific morning or afternoon marker in lower case, e.g."am" or "pm".
Surely this is backwards? Shouldn't an uppercase "P" indicate uppercase AM/PM and vice versa?
I have not tested if this is a documentation bug or is actually implemented like this, but I would strongly suggest this is not the behaviour developers would expect.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1) Look at http://java.sun.com/j2se/1.5.0/docs/api/java/util/Formatter.html
2) Search for "Locale-specific morning or afternoon marker in upper case"
3) Read "p" mean "AM/PM" and "P" means "am/pm"
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
At step 3 (above) I would expect to read:
"P" mean "AM/PM" and "p" means "am/pm"
Then step (4) would be:
4) Rejoice in this wonderful, intutative new feature
ERROR MESSAGES/STACK TRACES THAT OCCUR :
Unexpected Format Error
my.head.CannotComprehendError at line: 'p' Locale-specific morning or afternoon marker in upper case, e.g."AM" or "PM".
REPRODUCIBILITY :
This bug can be reproduced always.
(Incident Review ID: 237452)
======================================================================