Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Fix compareTo function for intenger
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Eng committed Nov 15, 2013
1 parent a9867f9 commit 85c1b59
Showing 1 changed file with 7 additions and 4 deletions.
Expand Up @@ -216,8 +216,11 @@ public int compare(HProjectIteration locale, HProjectIteration locale2) {
return Double.compare(wordStatistic1.getRemainingHours(),
wordStatistic2.getRemainingHours());
} else if (selectedSortOption.equals(SortingType.WORDS)) {
return Integer.compare(wordStatistic1.getTotal(),
wordStatistic2.getTotal());
if (wordStatistic1.getTotal() == wordStatistic2.getTotal()) {
return 0;
}
return wordStatistic1.getTotal() > wordStatistic2
.getTotal() ? 1 : -1;
}
} else {
return item1.getProject().getName()
Expand Down Expand Up @@ -352,7 +355,7 @@ private Map<LocaleId, List<HProjectIteration>> getMissingLocaleVersionMap() {

/**
* Search for locale that is not activated in given version
*
*
* @param version
* @return
*/
Expand All @@ -378,7 +381,7 @@ public String getMissingLocaleTitle(HProjectIteration version) {

/**
* Search for version that doesn't activate given locale
*
*
* @param localeId
* @return
*/
Expand Down

0 comments on commit 85c1b59

Please sign in to comment.