Calendar.java (set): First call computeFields if needed.
x * java/util/Calendar.java (set): First call computeFields if needed. * java/util/natGregorianCalendar.cc (computeTime): Cast 1000 to jlong. From-SVN: r26910
This commit is contained in:
parent
68ca6de40d
commit
8bb61fb953
@ -187,6 +187,7 @@ public abstract class Calendar implements java.io.Serializable, Cloneable
|
||||
|
||||
public final void set (int fld, int value)
|
||||
{
|
||||
if (! areFieldsSet) computeFields();
|
||||
fields[fld] = value;
|
||||
isTimeSet = false;
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ java::util::GregorianCalendar::computeTime ()
|
||||
t += zone->getRawOffset();
|
||||
|
||||
// Adjust for milliseconds.
|
||||
time = t * 1000 + elements(fields)[MILLISECOND];
|
||||
time = t * (jlong) 1000 + elements(fields)[MILLISECOND];
|
||||
|
||||
isTimeSet = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user