test/sun/util/calendar/zi/Rule.java

Print this page

        

*** 104,113 **** --- 104,114 ---- } final int y = year; RuleRec[] recs = new RuleRec[rules.size()]; rules.toArray(recs); + Arrays.sort(recs, new Comparator<RuleRec>() { public int compare(RuleRec r1, RuleRec r2) { int n = r1.getMonthNum() - r2.getMonthNum(); if (n != 0) { return n;
*** 115,125 **** // TODO: it's not accurate to ignore time types (STD, WALL, UTC) long t1 = Time.getLocalTime(y, r1.getMonth(), r1.getDay(), r1.getTime().getTime()); long t2 = Time.getLocalTime(y, r2.getMonth(), r2.getDay(), r2.getTime().getTime()); ! return (int)(t1 - t2); } public boolean equals(Object o) { return this == o; } }); --- 116,126 ---- // TODO: it's not accurate to ignore time types (STD, WALL, UTC) long t1 = Time.getLocalTime(y, r1.getMonth(), r1.getDay(), r1.getTime().getTime()); long t2 = Time.getLocalTime(y, r2.getMonth(), r2.getDay(), r2.getTime().getTime()); ! return Long.compare(t1, t2); } public boolean equals(Object o) { return this == o; } });