[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:
parent
ab156144da
commit
46f32b2b90
@ -1,3 +1,30 @@
|
||||
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,
|
||||
|
||||
2005-11-15 Jeroen Frijters <jeroen@frijters.net>
|
||||
|
||||
* java/io/ObjectInputStream.java
|
||||
|
@ -3236,7 +3236,7 @@ classpath/java/util/Collections.java \
|
||||
classpath/java/util/Comparator.java \
|
||||
classpath/java/util/ConcurrentModificationException.java \
|
||||
java/util/Currency.java \
|
||||
java/util/Date.java \
|
||||
classpath/java/util/Date.java \
|
||||
classpath/java/util/Dictionary.java \
|
||||
classpath/java/util/EmptyStackException.java \
|
||||
classpath/java/util/Enumeration.java \
|
||||
@ -3271,7 +3271,7 @@ classpath/java/util/Random.java \
|
||||
classpath/java/util/RandomAccess.java \
|
||||
java/util/ResourceBundle.java \
|
||||
classpath/java/util/Set.java \
|
||||
java/util/SimpleTimeZone.java \
|
||||
classpath/java/util/SimpleTimeZone.java \
|
||||
classpath/java/util/SortedMap.java \
|
||||
classpath/java/util/SortedSet.java \
|
||||
classpath/java/util/Stack.java \
|
||||
|
@ -629,6 +629,7 @@ public abstract class Calendar implements Serializable, Cloneable
|
||||
clear();
|
||||
this.time = time;
|
||||
isTimeSet = true;
|
||||
computeFields();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -879,7 +880,6 @@ public abstract class Calendar implements Serializable, Cloneable
|
||||
|
||||
/**
|
||||
* Fills any unset fields in the time field list
|
||||
* @return true if the specified field has a value.
|
||||
*/
|
||||
protected void complete()
|
||||
{
|
||||
@ -897,8 +897,19 @@ public abstract class Calendar implements Serializable, Cloneable
|
||||
*/
|
||||
public boolean equals(Object o)
|
||||
{
|
||||
return (o instanceof Calendar)
|
||||
&& getTimeInMillis() == ((Calendar) o).getTimeInMillis();
|
||||
if (! (o instanceof Calendar))
|
||||
return false;
|
||||
Calendar cal = (Calendar) o;
|
||||
if (getTimeInMillis() == ((Calendar) o).getTimeInMillis()
|
||||
&& cal.getFirstDayOfWeek() == getFirstDayOfWeek()
|
||||
&& cal.isLenient() == isLenient()
|
||||
&& cal.getMinimalDaysInFirstWeek() == getMinimalDaysInFirstWeek())
|
||||
{
|
||||
TimeZone self = getTimeZone();
|
||||
TimeZone oth = cal.getTimeZone();
|
||||
return self == null ? oth == null : self.equals(oth);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -909,7 +920,13 @@ public abstract class Calendar implements Serializable, Cloneable
|
||||
public int hashCode()
|
||||
{
|
||||
long time = getTimeInMillis();
|
||||
return (int) ((time & 0xffffffffL) ^ (time >> 32));
|
||||
int val = (int) ((time & 0xffffffffL) ^ (time >> 32));
|
||||
val += (getFirstDayOfWeek() + (isLenient() ? 1230 : 1237)
|
||||
+ getMinimalDaysInFirstWeek());
|
||||
TimeZone self = getTimeZone();
|
||||
if (self != null)
|
||||
val ^= self.hashCode();
|
||||
return val;
|
||||
}
|
||||
|
||||
/**
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -359,7 +359,7 @@ public abstract class ResourceBundle
|
||||
*
|
||||
* @param baseName the name of the ResourceBundle
|
||||
* @param locale A locale
|
||||
* @param classloader a ClassLoader
|
||||
* @param classLoader a ClassLoader
|
||||
* @return the desired resource bundle
|
||||
* @throws MissingResourceException if the resource bundle can't be found
|
||||
* @throws NullPointerException if any argument is null
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -3660,7 +3660,7 @@ classpath/java/util/Collections.java \
|
||||
classpath/java/util/Comparator.java \
|
||||
classpath/java/util/ConcurrentModificationException.java \
|
||||
java/util/Currency.java \
|
||||
java/util/Date.java \
|
||||
classpath/java/util/Date.java \
|
||||
classpath/java/util/Dictionary.java \
|
||||
classpath/java/util/EmptyStackException.java \
|
||||
classpath/java/util/Enumeration.java \
|
||||
@ -3695,7 +3695,7 @@ classpath/java/util/Random.java \
|
||||
classpath/java/util/RandomAccess.java \
|
||||
java/util/ResourceBundle.java \
|
||||
classpath/java/util/Set.java \
|
||||
java/util/SimpleTimeZone.java \
|
||||
classpath/java/util/SimpleTimeZone.java \
|
||||
classpath/java/util/SortedMap.java \
|
||||
classpath/java/util/SortedSet.java \
|
||||
classpath/java/util/Stack.java \
|
||||
|
Loading…
Reference in New Issue
Block a user