[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug classpath/22807] GregorianCalendar.computeTime - month out of range
From: |
gcc-bugzilla at gcc dot gnu dot org |
Subject: |
[Bug classpath/22807] GregorianCalendar.computeTime - month out of range |
Date: |
16 Oct 2005 01:27:17 -0000 |
Here's the original stack traces from running Apache Axis' tests using IKVM:
http://nagoya.apache.org/~dims/ikvm-report/test/encoding/PackageTests.html
See attached Test.java for stripped down test case.
Thanks,
dims
------- Comment #1 from from-classpath at savannah dot gnu dot org 2005-01-13
22:43 -------
The line causing your problem is:
date.set(0,0,0);
Note that the default calendar is the Gregorian one, which does not have a year
zero (1 AD was the year after 1 BC).
The date created by the JDK by date.set(0,0,0) is Dec 31, year 2; which is
clearly a bug.
The IllegalArgumentException is correct behavior, however the error message is
misleading. That should be fixed.
------- Comment #2 from from-classpath at savannah dot gnu dot org 2005-01-14
15:49 -------
My previous comment is wrong, it seems. With leniency set, it should accept
that date. Year zero works out to be year 1 BC, and "Jan 0" works out to be Dec
31 of the year before, thus the correct result *is* Dec 31, 2 BC.
This needs fixing.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22807
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug classpath/22807] GregorianCalendar.computeTime - month out of range,
gcc-bugzilla at gcc dot gnu dot org <=