OSDN Git Service

2007-02-21 Gary Benson <gbenson@redhat.com>
authorgary <gary@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 21 Feb 2007 13:47:51 +0000 (13:47 +0000)
committergary <gary@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 21 Feb 2007 13:47:51 +0000 (13:47 +0000)
* java/util/GregorianCalendar.java,
(add): Don't set fields directly anymore. Use set()

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122197 138bc75d-0d04-0410-961f-82ee72b054a4

libjava/classpath/ChangeLog.gcj
libjava/classpath/java/util/GregorianCalendar.java

index 9b1af8e..b76844a 100644 (file)
@@ -1,3 +1,8 @@
+2007-02-21  Gary Benson  <gbenson@redhat.com>
+
+       * java/util/GregorianCalendar.java,
+       (add): Don't set fields directly anymore. Use set()
+
 2007-02-20  Matthias Klose  <doko@ubuntu.com>
 
        * Merge doc update from classpath HEAD.
index 4a66d6e..83ac00e 100644 (file)
@@ -935,10 +935,11 @@ public class GregorianCalendar extends Calendar
            fields[MONTH] += 12;
            fields[YEAR]--;
          }
-       isTimeSet = false;
        int maxDay = getActualMaximum(DAY_OF_MONTH);
        if (fields[DAY_OF_MONTH] > maxDay)
          fields[DAY_OF_MONTH] = maxDay;
+       set(YEAR, fields[YEAR]);
+       set(MONTH, fields[MONTH]);
        break;
       case DAY_OF_MONTH:
       case DAY_OF_YEAR: