Use Double.compare() in comparators (findbugs)

This commit is contained in:
zzz
2018-10-08 13:34:15 +00:00
parent 524c375944
commit 6fccfc990a
3 changed files with 12 additions and 29 deletions

View File

@ -115,11 +115,7 @@ class SybilRenderer {
reasons.add(reason);
}
public int compareTo(Points r) {
if (points > r.points)
return 1;
if (points < r.points)
return -1;
return 0;
return Double.compare(points, r.points);
}
}