8277868: Use Comparable.compare() instead of surrogate code

Reviewed-by: rriggs, aivanov
This commit is contained in:
Sergey Tsypanov 2021-12-16 21:39:08 +00:00 committed by Roger Riggs
parent 937126b140
commit 20db7800a6
12 changed files with 23 additions and 75 deletions

View file

@ -4405,7 +4405,7 @@ public class BigDecimal extends Number implements Comparable<BigDecimal> {
x = -x;
if (y < 0)
y = -y;
return (x < y) ? -1 : ((x == y) ? 0 : 1);
return Long.compare(x, y);
}
private static int saturateLong(long s) {