<i18n dev> RFR: 8276348: Use blessed modifier order in java.base
Pavel Rappo
prappo at openjdk.java.net
Tue Nov 2 19:25:14 UTC 2021
On Tue, 2 Nov 2021 19:15:26 GMT, Andrey Turbanov <duke at openjdk.java.net> wrote:
>> This PR follows up one of the recent PRs, where I used a non-canonical modifier order. Since the problem was noticed [^1], why not to address it at mass?
>>
>> As far as I remember, the first mass-canonicalization of modifiers took place in JDK-8136583 in 2015 [^2]. That change affected 1780 lines spanning 453 files. Since then modifiers have become a bit loose, and it makes sense to re-bless (using the JDK-8136583 terminology) them.
>>
>> This change was produced by running the below command followed by updating the copyright years on the affected files where necessary:
>>
>> $ sh ./bin/blessed-modifier-order.sh src/java.base
>>
>> The resulting change is much smaller than that of 2015: 39 lines spanning 21 files.
>>
>> [^1]: https://mail.openjdk.java.net/pipermail/core-libs-dev/2021-November/082987.html (or https://github.com/openjdk/jdk/pull/6191#pullrequestreview-794333365)
>> [^2]: http://mail.openjdk.java.net/pipermail/core-libs-dev/2015-September/035217.html
>
> src/java.base/share/classes/java/lang/invoke/CallSite.java line 88:
>
>> 86: */
>> 87: public
>> 88: abstract class CallSite {
>
> I think it's better to move all modifiers to the single line.
This is a survivorship bias. This example jumps out at you, because it happens to use missorted modifiers. I'm pretty sure this is not an aberration, but a style. If you want to change that style, you should create a respective JBS issue.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6213
More information about the i18n-dev
mailing list