On Fri, 26 Nov 2021 12:46:59 GMT, Сергей Цыпанов <d...@openjdk.java.net> wrote:

> Instead of something like
> 
> long x;
> long y;
> return (x < y) ? -1 : ((x == y) ? 0 : 1);
> 
> we can use `return Long.compare(x, y);`
> 
> All replacements are done with IDE.

This pull request has now been integrated.

Changeset: 20db7800
Author:    Sergey Tsypanov <sergei.tsypa...@yandex.ru>
Committer: Roger Riggs <rri...@openjdk.org>
URL:       
https://git.openjdk.java.net/jdk/commit/20db7800a657b311eeac504a2bbae4adbc209dbf
Stats:     77 lines in 12 files changed: 2 ins; 54 del; 21 mod

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

Reviewed-by: rriggs, aivanov

-------------

PR: https://git.openjdk.java.net/jdk/pull/6575

Reply via email to