RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v13]

Jim Laskey jlaskey at openjdk.org
Mon May 15 17:21:59 UTC 2023


On Mon, 15 May 2023 06:38:48 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Jim Laskey has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Update VirtualParser.java
>
> src/java.base/share/classes/jdk/internal/misc/MainMethodFinder.java line 146:
> 
>> 144: 
>> 145:             if (Modifier.isStatic(mods) && mainMethod.getDeclaringClass() != mainClass) {
>> 146:                 System.err.println("WARNING: static main in super class will be deprecated.");
> 
> I thought that JEP 445 was deprecating this, in which case the text should be "is deprecated" rather than "will be".

JEP 445 is not deprecating this. No advanced notice has been given.

> src/java.base/share/classes/jdk/internal/misc/MainMethodFinder.java line 162:
> 
>> 160:             }
>> 161: 
>> 162:             if (1 < mains.size()) {
> 
> Checking if mains.size() > 1 might be easier on the eyes.

I never ever use > symbol. least to greatest left to right (maths).

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13689#discussion_r1194132127
PR Review Comment: https://git.openjdk.org/jdk/pull/13689#discussion_r1194133518


More information about the core-libs-dev mailing list