RFR: 8276401: Use blessed modifier order in java.net.http

Mark Sheppard msheppar at openjdk.java.net
Wed Nov 3 15:09:11 UTC 2021


On Wed, 3 Nov 2021 10:11:31 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

> Hi, 
> 
> Please find here a trivial cleanup change that updates classes in the `java.net.http` module to use the "blessed modifier order".
> 
> The changeset was obtained by running `sh ./bin/blessed-modifier-order.sh src/java.net.http`.
> 
> best regards,
> 
> -- daniel

> _Mailing list message from [Daniel Fuchs](mailto:daniel.fuchs at oracle.com) on [net-dev](mailto:net-dev at mail.openjdk.java.net):_
> 
> Hi Mark,
> 
> On 03/11/2021 14:30, Mark Sheppard wrote:
> 
> > a general comment on the static abstract class  changes to abstract static class. For me the former and current declarations seems more appropriate, that is, static abstract class,  as the static modifier immediately conveys a significant and strong structural relationship with outer or containing class. While abstract has a qualification on class i.e. the type of class and appearing directly before class is more natural (to me !!). As such, abstract qualifies the static relationship.
> > The placement and ordering of the modifier should be to assist in covering semantics when scanning code, and conveys a certain level of "importance" of the qualifier's semantics
> 
> WRT `static abstract` vs `abstract static` I had exactly the same feeling - but since there is a blessed ordering and a script to fix classes to conform to the blessed ordering I'm not going to fight it.
> 
> best regards,
> 
> -- daniel

:-)  cula bula ... that's fair enough, no argument here, just thought it worth a comment.
as with a lot of "style guides", the blessed order can be a little idiosyncratic
a bit like the case of would you wear a stripped tie with a check shirt, or is a plain tie the only suitable option :-)

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

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


More information about the net-dev mailing list