This is the mail archive of the java-discuss@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Date/Calendar related fixes (?)


> 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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]