changeset 5129:8776068d7eb7

6932473: (tz) javazic produces incorrect SimpleTimeZone parameters with Sun<=7 Reviewed-by: peytoia
author okutsu
date Wed, 10 Mar 2010 14:32:47 +0900
parents 2e385fe87079
children 1b0fbb188691
files jdk/make/tools/src/build/tools/javazic/RuleDay.java
diffstat 1 files changed, 3 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/make/tools/src/build/tools/javazic/RuleDay.java	Thu Mar 04 13:07:48 2010 -0800
+++ b/jdk/make/tools/src/build/tools/javazic/RuleDay.java	Wed Mar 10 14:32:47 2010 +0900
@@ -139,7 +139,7 @@
         if (isLast()) {
             return -1;
         }
-        return getDay();
+        return isEarlier() ? -getDay() : getDay();
     }
 
     /**
@@ -147,13 +147,10 @@
      * @return the SimpleTimeZone day-of-week rule value
      */
     int getDayOfWeekForSimpleTimeZoneInt() {
-        if (!isLater() && !isEarlier() && !isLast()) {
-            return 0;
-        }
-        if (isLater()) {
+        if (isEarlier() || isLater()) {
             return -getDayOfWeekNum();
         }
-        return getDayOfWeekNum();
+        return isLast() ? getDayOfWeekNum() : 0;
     }
 
     /**