Modifier order for 'default' (was: RFR: 8136583: Core libraries should use blessed modifier order)

Paul Sandoz paul.sandoz at
Wed Sep 16 11:34:39 UTC 2015

Hi Bernd,

In some respects “default” is easy. It can only occur on non-abstract methods on interfaces, and declaring such methods “public” is redundant (as is the case for abstract methods on interfaces, where also declaring “abstract” is redundant). [*] And there are more redundant cases related to enums and nested classes.

A further clean up would to run relevant code inspections in the IDE to remove redundant declarations.


[*] FWIW there are a few cases of “public default” and “default public” in the OpenJDK source code

On 16 Sep 2015, at 04:48, ecki at wrote:

> Martin, this will be known as the "blame martin" patch, good work.
> But more seriously a minor thing I noticed in your shell script (as well as the mentioned sources and some coding guidelines), the new interface `default` method modifier is not defined in any of those lists.
> Not sure if it is actually a problem for this patch (there seems to be no line with default modifier), but its just a general observation (with the hidden hope to get an authoritative consensus of the location of `default` as well, even when it might be the wrong mailinglist).
> Greetings
> Bernd
> --
> -----Original Message-----
> From: Martin Buchholz <martinrb at>
> To: core-libs-dev <core-libs-dev at>, Chris Hegarty <chris.hegarty at>, Paul Sandoz <paul.sandoz at>
> Sent: Mi., 16 Sep. 2015 2:54
> Subject: RFR: 8136583: Core libraries should use blessed modifier order
> Hi, Chris and Paul,
> I'd like you to do a very boring code review.
> This change is entirely machine generated. (the script is more interesting)

More information about the core-libs-dev mailing list