GregorianCalendar.java (computeTime): Only call getTimeZone() once.

* java/util/GregorianCalendar.java (computeTime): Only call
	getTimeZone() once.

From-SVN: r42121
This commit is contained in:
Tom Tromey 2001-05-15 21:44:24 +00:00 committed by Tom Tromey
parent d2c4367503
commit 6f4226f843
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2001-05-15 Tom Tromey <tromey@redhat.com>
* java/util/GregorianCalendar.java (computeTime): Only call
getTimeZone() once.
2001-05-14 Tom Tromey <tromey@redhat.com>
* java/text/SimpleDateFormat.java (parse): Clear DST_OFFSET and

View File

@ -405,7 +405,7 @@ public class GregorianCalendar extends Calendar
TimeZone zone = getTimeZone();
int rawOffset = isSet[ZONE_OFFSET]
? fields[ZONE_OFFSET] : getTimeZone().getRawOffset();
? fields[ZONE_OFFSET] : zone.getRawOffset();
int dayOfYear = daysOfYear[0] + daysOfYear[1];
int month = (dayOfYear * 5 + 3) / (31 + 30 + 31 + 30 + 31);