Date/Calendar related fixes (?)

Per Bothner bothner@cygnus.com
Wed May 12 14:55:00 GMT 1999


> time = t * 1000LL + elements(fields)[MILLISECOND];

I suggest instead:

> time = t * (jlong) 1000 + elements(fields)[MILLISECOND];

> Second in Calendar.java, setTimeInMillis, line 249
>> computeFields();
>
> I replaced clear() with computeFields(). My app extensively uses
> Date.setMinute() etc.

I think it would be better to fix set in Calendar.java:

  public final void set (int fld, int value)
  {
    if (! areFieldsSet) computeFields();
    fields[fld] = value;
    isTimeSet = false;
  }

Could you try these?

	--Per Bothner
bothner@cygnus.com     http://www.cygnus.com/~bothner




More information about the Java mailing list