[multiple changes]

2005-11-15  Tom Tromey  <tromey@redhat.com>

       classpath/23890:
       * java/util/Calendar.java (equals): Include other calendar
       attributes.
       (hashCode): Updated.
       * java/util/GregorianCalendar.java (hashCode): New method.
       (equals): Use super.equals().

2005-11-15  Sven de Marothy  <sven@physto.se>

       * java/util/Calendar (setTimeInMillis): Recompute time fields.

2005-11-15  Mark Wielaard  <mark@klomp.org>

       * java/util/SimpleTimeZone.java: Removed, fully merged now.
       * java/util/Date.java: Likewise.
       * sources.am: Regenerated.
       * Makefile.in: Regenerated.

2005-11-15  David Gilbert  <david.gilbert@object-refinery.com>

       * java/util/Calendar.java: fixed minor problems in API docs,
       * java/util/Date.java: likewise,
       * java/util/ResourceBundle.java: likewise,
       * java/util/SimpleTimeZone.java: likewise,

From-SVN: r107094
This commit is contained in:
Mark Wielaard 2005-11-16 19:43:53 +00:00
parent ab156144da
commit 46f32b2b90
8 changed files with 66 additions and 2349 deletions

View file

@ -871,6 +871,17 @@ public class GregorianCalendar extends Calendar
areFieldsSet = isSet[ERA] = isSet[YEAR] = isSet[MONTH] = isSet[WEEK_OF_YEAR] = isSet[WEEK_OF_MONTH] = isSet[DAY_OF_MONTH] = isSet[DAY_OF_YEAR] = isSet[DAY_OF_WEEK] = isSet[DAY_OF_WEEK_IN_MONTH] = isSet[AM_PM] = isSet[HOUR] = isSet[HOUR_OF_DAY] = isSet[MINUTE] = isSet[SECOND] = isSet[MILLISECOND] = isSet[ZONE_OFFSET] = isSet[DST_OFFSET] = true;
}
/**
* Return a hash code for this object, following the general contract
* specified by {@link Object#hashCode()}.
* @return the hash code
*/
public int hashCode()
{
int val = (int) ((gregorianCutover >>> 32) ^ (gregorianCutover & 0xffffffff));
return super.hashCode() ^ val;
}
/**
* Compares the given calendar with this. An object, o, is
@ -893,7 +904,8 @@ public class GregorianCalendar extends Calendar
return false;
GregorianCalendar cal = (GregorianCalendar) o;
return (cal.getTimeInMillis() == getTimeInMillis());
return (cal.gregorianCutover == gregorianCutover
&& super.equals(o));
}
/**