On Fri, 5 May 2023 09:30:54 GMT, Jaikiran Pai <j...@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 142:
> 
>> 140: 
>> 141:             if (mainMethod.getDeclaringClass() != mainClass) {
>> 142:                 System.err.println("WARNING: static main in super class 
>> will be deprecated.");
> 
> Similarly, this warning would have to be logged only if the method is 
> `static`. Furthermore, do you think we should include the declaring class in 
> the log message to provide some context on what's causing this warning? 
> Something like:
>> WARNING: static main(String[]) in super class foo.bar.Parent will be 
>> deprecated.

Yes this is an oversight on my part.

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

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

Reply via email to