Re: RFR: 8277868: Use Comparable.compare() instead of surrogate code [v3]

2021-12-07 Thread Сергей Цыпанов
On Tue, 7 Dec 2021 12:01:27 GMT, Alexey Ivanov wrote: >> Сергей Цыпанов has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8277868: Inline local var > > src/java.base/share/classes/java/util/Calendar.java line 3420: > >> 3418: private

Re: RFR: 8277868: Use Comparable.compare() instead of surrogate code [v3]

2021-12-07 Thread Alexey Ivanov
On Tue, 7 Dec 2021 08:28:47 GMT, Сергей Цыпанов 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. > > Сергей Цыпанов has updated the pull request incr

Re: RFR: 8277868: Use Comparable.compare() instead of surrogate code [v3]

2021-12-07 Thread Сергей Цыпанов
> 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. Сергей Цыпанов has updated the pull request incrementally with one additional commit since the last revision: 827