Code review request

Paul Sandoz paul.sandoz at oracle.com
Tue Feb 26 15:41:14 UTC 2013


On Feb 26, 2013, at 2:50 PM, Remi Forax <forax at univ-mlv.fr> wrote:

> On 02/25/2013 06:31 PM, Paul Sandoz wrote:
>> Hi Remi,
>> 
>> Thanks for the feedback i have addressed some of this, mostly related to inner classes, in following change set to the lambda repo:
>> 
>> http://hg.openjdk.java.net/lambda/lambda/jdk/rev/3e50294c68ea
>> 
>> We can update the webrev next week.
> 
> <nitpicking mode="on">
> 
> There are still some methods that are declared 'default public'

Where?


> and some that are declared just with 'default'.
> 

> I propose the following code convention for abstract/default method in interface.
> All methods in interface are marked public (just because we may support private static method in jdk9),
> default method should be 'public default' and not 'default public', like we have public static, visibility modifier first,
> and abstract methods in the same interface should be declared only 'public'.
> 

I do not relish your proposal of changing all abstract methods in interfaces to be declared redundantly public because of potential future features, even if such features are highly likely, we should have that discussion when those feature arrive.

The source in the java.util.function package uses "public default" for default methods. That source has been through a round of reviews strongly indicating this was the preferred approach. Mike, is that so?

Paul.


More information about the core-libs-dev mailing list