RFR: 8335991: Implement Simple Source Files and Instance Main Methods (Fourth Preview)

Jan Lahoda jlahoda at openjdk.org
Sat Nov 2 17:11:28 UTC 2024


On Sat, 2 Nov 2024 15:11:05 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> src/java.base/share/classes/jdk/internal/javac/PreviewFeature.java line 72:
>> 
>>> 70:         //---
>>> 71:         @JEP(number=495, title="Simple Source Files and Instance Main Methods", status="Fourth Preview")
>>> 72:         IMPLICIT_CLASSES,
>> 
>> Hello Jan, although it's just an internal enum name, do you think we should rename it to be closer to the JEP's title or is it not worth it?
>
> The title also shows up in list of preview APIs in the javadoc so changing seems correct.

Please note the title is adjusted to match the current name of the JEP. So the built javadoc should not be an issue. What Jaikiran is speaking about is the enum constant name, which hopefully(!) does not have a meaning outside of the JDK.

We could change the constant to `SIMPLE_SOURCE_FILES_AND_INSTANCE_MAIN_METHODS` (to precisely reflect the JEP's name), but it seems like an unnecessary git churn to me. We might also need to keep the existing constant due to bootstrap issues, then remove it when JDK 25 is switched to bootstrap on JDK 24.

I can do that, if really needed, though.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21787#discussion_r1826603335


More information about the compiler-dev mailing list