-
Bug
-
Resolution: Not an Issue
-
P2
-
None
-
5.0
-
x86
-
windows_xp
There seems regression in 1.5.0beta(b37) when we use the Calendar class.
Calendar instance outputs java.lang.IllegalArgumentException
on 02-29-2004 and 12-31-2004 in 1.5.0 and 1.3.1(_0X),
but it works well in 1.4.X.
To REPRODUCE:
(1) Compile the attched program(LeapYear.java)
(2) Set the date of your PC to 2-29-2004
(3) Launch "java LeapYear"
==> You will see the exception.
K:\temp>java LeapYear
java.lang.IllegalArgumentException: MONTH
at java.util.GregorianCalendar.computeTime(GregorianCalendar.java:2392)
at java.util.Calendar.updateTime(Calendar.java:2241)
at java.util.Calendar.complete(Calendar.java:1305)
at java.util.Calendar.get(Calendar.java:1088)
at LeapYear.main(LeapYear.java:13)
(4) Set the date of your PC to 12-31-2004
(5) Launch "java LeapYear"
==> You will see the same exception.
(6) Set the date of your PC to teh date other than 2/29 and 12/31
on leap year.
(7) Launch "java LeapYear"
==> You don't see the exception.
NOTE:
- This exception shows up on 2/29/2004, 12/31/2004 and same days on leapyear
in 1.5.0-beta2.
- The exception does not occur in 1.4.X.
So, thas seems regression.
CONFIGURATION :
OS : WindowsXP(SP1, Japanese)
JRE/JDK : 1.5.0-beta-b37(and 1.3.1)
K:\temp>java -version
java version "1.5.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta2-b37)
Java HotSpot(TM) Client VM (build 1.5.0-beta2-b37, mixed mode)
==============================================================================
Calendar instance outputs java.lang.IllegalArgumentException
on 02-29-2004 and 12-31-2004 in 1.5.0 and 1.3.1(_0X),
but it works well in 1.4.X.
To REPRODUCE:
(1) Compile the attched program(LeapYear.java)
(2) Set the date of your PC to 2-29-2004
(3) Launch "java LeapYear"
==> You will see the exception.
K:\temp>java LeapYear
java.lang.IllegalArgumentException: MONTH
at java.util.GregorianCalendar.computeTime(GregorianCalendar.java:2392)
at java.util.Calendar.updateTime(Calendar.java:2241)
at java.util.Calendar.complete(Calendar.java:1305)
at java.util.Calendar.get(Calendar.java:1088)
at LeapYear.main(LeapYear.java:13)
(4) Set the date of your PC to 12-31-2004
(5) Launch "java LeapYear"
==> You will see the same exception.
(6) Set the date of your PC to teh date other than 2/29 and 12/31
on leap year.
(7) Launch "java LeapYear"
==> You don't see the exception.
NOTE:
- This exception shows up on 2/29/2004, 12/31/2004 and same days on leapyear
in 1.5.0-beta2.
- The exception does not occur in 1.4.X.
So, thas seems regression.
CONFIGURATION :
OS : WindowsXP(SP1, Japanese)
JRE/JDK : 1.5.0-beta-b37(and 1.3.1)
K:\temp>java -version
java version "1.5.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta2-b37)
Java HotSpot(TM) Client VM (build 1.5.0-beta2-b37, mixed mode)
==============================================================================
- relates to
-
JDK-4401223 Gregorian calendar gives a java.lang.IllegalArgumentException only on 12-31-00
-
- Closed
-