RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v8]
Jim Laskey
jlaskey at openjdk.org
Fri May 5 15:28:23 UTC 2023
On Fri, 5 May 2023 09:39:07 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:
>> Jim Laskey has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - Anonymous main classes renamed to unnamed classes
>> - Add test
>
> src/java.base/share/classes/jdk/internal/misc/MainMethodFinder.java line 158:
>
>> 156: }
>> 157:
>> 158: mains.sort(MainMethodFinder::compareMethods);
>
> Perhaps skip the call to `sort` and just return the found main method if `mains.size() == 1`?
Likely negligible difference since it's interpreted code, but what the hey.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13689#discussion_r1186227774
More information about the core-libs-dev
mailing list