summaryrefslogtreecommitdiff
path: root/libjava/classpath/java
diff options
context:
space:
mode:
authorgary <gary@138bc75d-0d04-0410-961f-82ee72b054a4>2007-02-21 13:47:51 +0000
committergary <gary@138bc75d-0d04-0410-961f-82ee72b054a4>2007-02-21 13:47:51 +0000
commit47079da24280fa2089352202c07f7689e850b7aa (patch)
tree3d4fad0ba3194fb9b7da4f55522d7afc4288f2da /libjava/classpath/java
parent505c23043500ce0d4f3c73f255a7eaeb16bb3fe7 (diff)
downloadgcc-47079da24280fa2089352202c07f7689e850b7aa.tar.gz
2007-02-21 Gary Benson <gbenson@redhat.com>
* 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
Diffstat (limited to 'libjava/classpath/java')
-rw-r--r--libjava/classpath/java/util/GregorianCalendar.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/libjava/classpath/java/util/GregorianCalendar.java b/libjava/classpath/java/util/GregorianCalendar.java
index 4a66d6e08ef..83ac00e77e0 100644
--- a/libjava/classpath/java/util/GregorianCalendar.java
+++ b/libjava/classpath/java/util/GregorianCalendar.java
@@ -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: