jdk/test/sun/util/calendar/zi/Rule.java
changeset 28094 d0383a8fa398
parent 23010 6dadb192ad81
equal deleted inserted replaced
28093:270b6925cbc8 28094:d0383a8fa398
   124                     return this == o;
   124                     return this == o;
   125                 }
   125                 }
   126             });
   126             });
   127         rules.clear();
   127         rules.clear();
   128         for (int i = 0; i < n; i++) {
   128         for (int i = 0; i < n; i++) {
       
   129             if (i != 0 && recs[i -1].getSave() == recs[i].getSave()) {
       
   130                 // we have two recs back to back with same saving for the same year.
       
   131                 if (recs[i].isLastRule()) {
       
   132                     continue;
       
   133                 } else if (recs[i - 1].isLastRule()) {
       
   134                     rules.remove(rules.size() - 1);
       
   135                 }
       
   136             }
   129             rules.add(recs[i]);
   137             rules.add(recs[i]);
   130         }
   138         }
   131         return rules;
   139         return rules;
   132     }
   140     }
   133 
   141