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:
Per Bothner 1999-05-12 11:01:31 -07:00
parent 68ca6de40d
commit 8bb61fb953
2 changed files with 2 additions and 1 deletions

View File

@ -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;
}

View File

@ -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;
}