[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cp-patches] small fix to GregorianCalendar
From: |
Michael Koch |
Subject: |
Re: [cp-patches] small fix to GregorianCalendar |
Date: |
Thu, 18 Nov 2004 22:25:22 +0100 |
User-agent: |
KMail/1.6.2 |
Am Donnerstag, 18. November 2004 21:16 schrieb Noa Resare:
> In current classpath, if you fetch a Calendar object with
> getInstance() and clear() it and set just the MONTH and YEAR field
> you get a calendar that is set to the first day of the given year
> with the month value simply dropped.
>
> This is because the getDayOfYear() method in GregorianCalendar
> doesn't handle the case where year and month is set and not day.
> According to the documentation the default value for DAY_OF_MONTH
> should be used (which happens to be 1) but our implementation just
> returns the first day of the year.
Are there mauve testcases that check for this so we can be sure this
is fixed after patching classpath ?
> Attached is a patch that fixes that, making behavior consistent
> with j2sdk1.4.2_06 and removing one mauve test failure in
> java.util.Calendar.set
>
> Ok to apply?
Bryce McKinley should look into this.
Michael
--
Homepage: http://www.worldforge.org/