<i18n dev> RFR: 8272863: Replace usages of Collections.sort with List.sort call in public java modules [v2]
dfuchs at openjdk.java.net
Wed Aug 25 08:33:26 UTC 2021
On Tue, 24 Aug 2021 20:21:52 GMT, Andrey Turbanov <github.com+741251+turbanoff at openjdk.org> wrote:
>> Collections.sort is just a wrapper, so it is better to use an instance method directly.
> Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision:
> 8272863: Replace usages of Collections.sort with List.sort call in public java modules
> replace Collections.sort without comparator too
src/java.base/share/classes/java/net/URLPermission.java line 222:
> 221: List<String> l = normalizeMethods(methods);
> 222: l.sort(null);
I am not opposed to this change, but I find this is slightly more ugly than `Collections.sort(l)`; so I have to ask: Is there any noticeable benefit?
More information about the i18n-dev