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

Jim Laskey jlaskey at openjdk.org
Fri May 26 13:08:08 UTC 2023


On Fri, 26 May 2023 06:20:14 GMT, Rémi Forax <forax at openjdk.org> wrote:

>> test/jdk/tools/launcher/InstanceMainTest.java line 31:
>> 
>>> 29:  * @run main InstanceMainTest
>>> 30:  */
>>> 31: public class InstanceMainTest extends TestHelper {
>> 
>> By my reading of the spec, "main" methods can be defined in record classes and enum classes as well as normal classes.
>> Are there tests for record and enum main method operation?
>
> You can also have a `main` method inside an interface. For enum classes and interfaces, the main has to be static.

updating tests

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

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



More information about the build-dev mailing list