Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
youyong205 committed Jan 2, 2015
1 parent 0cd61bf commit 07aac96
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ private Item findOrCreateItem(String minute, String domain) {
Map<String, Item> temp = m_items.get(minute);

if (temp == null) {
temp = new HashMap<String, Item>();
temp = new LinkedHashMap<String, Item>();
m_items.put(minute, temp);
}
Item item = temp.get(domain);
Expand All @@ -367,7 +367,7 @@ public int compare(String o1, String o2) {
String hour2 = o2.substring(0, 2);

if (!hour1.equals(hour2)) {
return Integer.parseInt(hour2) - Integer.parseInt(hour1);
return (Integer.parseInt(hour2) + 24) % 25 - (Integer.parseInt(hour1) + 24) % 25;
} else {
String first = o1.substring(3, 5);
String end = o2.substring(3, 5);
Expand Down

0 comments on commit 07aac96

Please sign in to comment.