Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v10]

2023-11-02 Thread Vicente Romero
On Thu, 2 Nov 2023 20:48:45 GMT, Jim Laskey wrote: >> Address changes from JEP 445 to JEP 463. >> >> - Move from a SYNTHETIC unnamed class to a MANDATED implicit class. >> >> - Don't mark class on read. >> >> - Remove reflection and annotation processing related to unnamed classes. >> >> -

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v10]

2023-11-02 Thread Mandy Chung
On Thu, 2 Nov 2023 20:48:45 GMT, Jim Laskey wrote: >> Address changes from JEP 445 to JEP 463. >> >> - Move from a SYNTHETIC unnamed class to a MANDATED implicit class. >> >> - Don't mark class on read. >> >> - Remove reflection and annotation processing related to unnamed classes. >> >> -

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v10]

2023-11-02 Thread Jim Laskey
> Address changes from JEP 445 to JEP 463. > > - Move from a SYNTHETIC unnamed class to a MANDATED implicit class. > > - Don't mark class on read. > > - Remove reflection and annotation processing related to unnamed classes. > > - Simplify main method search. Jim Laskey has updated the pull

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v9]

2023-11-02 Thread Jim Laskey
> Address changes from JEP 445 to JEP 463. > > - Move from a SYNTHETIC unnamed class to a MANDATED implicit class. > > - Don't mark class on read. > > - Remove reflection and annotation processing related to unnamed classes. > > - Simplify main method search. Jim Laskey has updated the pull

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v8]

2023-11-02 Thread Alan Bateman
On Thu, 2 Nov 2023 17:53:12 GMT, Jim Laskey wrote: > I thought it was a clearer way to get rid of the side effect. It means LauncherHelper.checkAndLoadMain description will need to be updated as it says that it checks the public static void main method. But okay, I'll go through what you have

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v8]

2023-11-02 Thread Jim Laskey
On Thu, 2 Nov 2023 17:45:51 GMT, Alan Bateman wrote: >> Amazingly enough I seem to have the JNI straight on the first try. > >> Amazingly enough I seem to have the JNI straight on the first try. > > Oh, I wasn't expecting that. My comment was suggesting we change >

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v2]

2023-11-02 Thread Rémi Forax
On Thu, 2 Nov 2023 12:24:31 GMT, Jim Laskey wrote: >> Uhmm. In the spec I see implicit classes named here: >> >> >> For reference, the following constructs are declared implicitly in source >> code, but are not marked as mandated because only formal parameters and >> modules can be so

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v2]

2023-11-02 Thread Jim Laskey
On Thu, 2 Nov 2023 17:21:02 GMT, Jan Lahoda wrote: >> No. It should be left at the first preview level. > > `UNNAMED_CLASSES` should probably be removed, as I think it is fully replaced > with `IMPLICIT_CLASSES`, and I don't think there are bootstrap problems here > (unlike in

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v8]

2023-11-02 Thread Jim Laskey
> Address changes from JEP 445 to JEP 463. > > - Move from a SYNTHETIC unnamed class to a MANDATED implicit class. > > - Don't mark class on read. > > - Remove reflection and annotation processing related to unnamed classes. > > - Simplify main method search. Jim Laskey has updated the pull

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v7]

2023-11-02 Thread Jim Laskey
On Thu, 2 Nov 2023 17:26:19 GMT, Jan Lahoda wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Revised implicit class test > > test/jdk/java/lang/Class/ImplicitClass/TestImplicitClass.java line 25: > >> 23: >> 24: /*

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v4]

2023-11-02 Thread Jim Laskey
On Thu, 2 Nov 2023 17:30:40 GMT, Jan Lahoda wrote: >> Missed that. The issue is that Implicit Classes don't have any API and don't >> show up in the preview page. Fixed. > > Regarding removal of `UNNAMED_CLASSES` here, there was an API annotated using > this constant in `j.l.Class`

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v7]

2023-11-02 Thread Jim Laskey
On Thu, 2 Nov 2023 17:17:42 GMT, Jan Lahoda wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Revised implicit class test > > src/java.base/share/classes/jdk/internal/misc/MainMethodFinder.java line 33: > >> 31:

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v7]

2023-11-02 Thread Alan Bateman
On Thu, 2 Nov 2023 15:45:03 GMT, Jim Laskey wrote: > Amazingly enough I seem to have the JNI straight on the first try. Oh, I wasn't expecting that. My comment was suggesting we change LauncherHelper.checkAndLoadMain to set both appClass and mainType after the validate succeeds.

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v2]

2023-11-02 Thread Jan Lahoda
On Thu, 2 Nov 2023 11:55:50 GMT, Jim Laskey wrote: >> src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java line 249: >> >>> 247: STRING_TEMPLATES(JDK21, Fragments.FeatureStringTemplates, >>> DiagKind.PLURAL), >>> 248: UNNAMED_CLASSES(JDK21,

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v4]

2023-11-02 Thread Jan Lahoda
On Thu, 2 Nov 2023 14:52:46 GMT, Jim Laskey wrote: >> src/java.base/share/classes/jdk/internal/javac/PreviewFeature.java line 76: >> >>> 74: UNNAMED_CLASSES, >>> 75: @JEP(number=999, title="Implicit Classes and Instance Main >>> Methods") >>> 76: IMPLICIT_CLASSES, >>

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v7]

2023-11-02 Thread Jan Lahoda
On Thu, 2 Nov 2023 16:19:07 GMT, Jim Laskey wrote: >> Address changes from JEP 445 to JEP 463. >> >> - Move from a SYNTHETIC unnamed class to a MANDATED implicit class. >> >> - Don't mark class on read. >> >> - Remove reflection and annotation processing related to unnamed classes. >> >> -

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v6]

2023-11-02 Thread Jim Laskey
On Thu, 2 Nov 2023 14:53:44 GMT, Jim Laskey wrote: >> src/java.base/share/classes/sun/launcher/LauncherHelper.java line 973: >> >>> 971: abort(null, "java.launcher.cls.error3", >>> 972: mainMethod.getDeclaringClass().getName()); >>> 973: } >> >> The

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v7]

2023-11-02 Thread Jim Laskey
> Address changes from JEP 445 to JEP 463. > > - Move from a SYNTHETIC unnamed class to a MANDATED implicit class. > > - Don't mark class on read. > > - Remove reflection and annotation processing related to unnamed classes. > > - Simplify main method search. Jim Laskey has updated the pull

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v5]

2023-11-02 Thread Maurizio Cimadamore
On Thu, 2 Nov 2023 12:34:49 GMT, Jim Laskey wrote: >> Why is the test removed? > > Since there is no way to detect an implicit class, the test is no longer > relevant. Right, but the test was still checking useful stuff - e.g. like the fact that the class generated by javac was final, etc (in

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v6]

2023-11-02 Thread Jim Laskey
> Address changes from JEP 445 to JEP 463. > > - Move from a SYNTHETIC unnamed class to a MANDATED implicit class. > > - Don't mark class on read. > > - Remove reflection and annotation processing related to unnamed classes. > > - Simplify main method search. Jim Laskey has updated the pull

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v6]

2023-11-02 Thread Jim Laskey
On Thu, 2 Nov 2023 15:33:25 GMT, Maurizio Cimadamore wrote: >> Since there is no way to detect an implicit class, the test is no longer >> relevant. > > Right, but the test was still checking useful stuff - e.g. like the fact that > the class generated by javac was final, etc (in accordance

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v5]

2023-11-02 Thread Jim Laskey
On Thu, 2 Nov 2023 14:38:06 GMT, Alan Bateman wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update JEP number in PreviewFeature > > src/java.base/share/classes/sun/launcher/LauncherHelper.java line 973: > >> 971:

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v5]

2023-11-02 Thread Jim Laskey
> Address changes from JEP 445 to JEP 463. > > - Move from a SYNTHETIC unnamed class to a MANDATED implicit class. > > - Don't mark class on read. > > - Remove reflection and annotation processing related to unnamed classes. > > - Simplify main method search. Jim Laskey has updated the pull

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v4]

2023-11-02 Thread Jim Laskey
On Thu, 2 Nov 2023 13:53:02 GMT, Alan Bateman wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Remove MANDATED flag from implicit classes > > src/java.base/share/classes/jdk/internal/javac/PreviewFeature.java line

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v4]

2023-11-02 Thread Alan Bateman
On Thu, 2 Nov 2023 12:33:27 GMT, Jim Laskey wrote: >> Address changes from JEP 445 to JEP 463. >> >> - Move from a SYNTHETIC unnamed class to a MANDATED implicit class. >> >> - Don't mark class on read. >> >> - Remove reflection and annotation processing related to unnamed classes. >> >> -

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v4]

2023-11-02 Thread Alan Bateman
On Thu, 2 Nov 2023 12:33:27 GMT, Jim Laskey wrote: >> Address changes from JEP 445 to JEP 463. >> >> - Move from a SYNTHETIC unnamed class to a MANDATED implicit class. >> >> - Don't mark class on read. >> >> - Remove reflection and annotation processing related to unnamed classes. >> >> -

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v4]

2023-11-02 Thread Jim Laskey
On Thu, 2 Nov 2023 12:04:22 GMT, Maurizio Cimadamore wrote: >> The class is discoverable but only as a regular class. > > Why is the test removed? Since there is no way to detect an implicit class, the test is no longer relevant. - PR Review Comment:

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v4]

2023-11-02 Thread Jim Laskey
> Address changes from JEP 445 to JEP 463. > > - Move from a SYNTHETIC unnamed class to a MANDATED implicit class. > > - Don't mark class on read. > > - Remove reflection and annotation processing related to unnamed classes. > > - Simplify main method search. Jim Laskey has updated the pull

Re: RFR: JDK-8319300: Remove unused methods in WorkArounds and Utils [v2]

2023-11-02 Thread Hannes Wallnöfer
> Please review a simple removal of unused methods in `WorkArounds` and > `Utils`. > > `Utils.findClass(Element,String)` was the principal entry point of this > cluster of methods. It was last used by the `ThrowsTaglet` `inherit` method, > but that code was removed in JDK-8295277. Hannes

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v2]

2023-11-02 Thread Jim Laskey
On Thu, 2 Nov 2023 12:11:52 GMT, Maurizio Cimadamore wrote: >> The spec has been updated to include implicit classes. > > Uhmm. In the spec I see implicit classes named here: > > > For reference, the following constructs are declared implicitly in source > code, but are not marked as

Integrated: JDK-8319300: Remove unused methods in WorkArounds and Utils

2023-11-02 Thread Hannes Wallnöfer
On Thu, 2 Nov 2023 10:16:10 GMT, Hannes Wallnöfer wrote: > Please review a simple removal of unused methods in `WorkArounds` and > `Utils`. > > `Utils.findClass(Element,String)` was the principal entry point of this > cluster of methods. It was last used by the `ThrowsTaglet` `inherit`

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v2]

2023-11-02 Thread Maurizio Cimadamore
On Thu, 2 Nov 2023 11:53:09 GMT, Jim Laskey wrote: >> src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java >> line 4057: >> >>> 4055: Name name = names.fromString(simplename); >>> 4056: JCModifiers implicitMods = F.at(Position.NOPOS) >>> 4057:

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v2]

2023-11-02 Thread Maurizio Cimadamore
On Thu, 2 Nov 2023 11:55:17 GMT, Jim Laskey wrote: >> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java line 442: >> >>> 440: Errors.ClassPublicShouldBeInFile(topElement, >>> tree.name)); >>> 441: } >>> 442: if

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v3]

2023-11-02 Thread Jim Laskey
On Thu, 2 Nov 2023 11:39:19 GMT, Jim Laskey wrote: >> Address changes from JEP 445 to JEP 463. >> >> - Move from a SYNTHETIC unnamed class to a MANDATED implicit class. >> >> - Don't mark class on read. >> >> - Remove reflection and annotation processing related to unnamed classes. >> >> -

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v2]

2023-11-02 Thread Jim Laskey
On Thu, 2 Nov 2023 11:12:14 GMT, Maurizio Cimadamore wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Remove obsolete tests > > src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java line 249: > >>

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v3]

2023-11-02 Thread Jim Laskey
On Thu, 2 Nov 2023 11:18:19 GMT, Maurizio Cimadamore wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Remove .orig files > > test/langtools/tools/javac/processing/model/element/TestUnnamedClass.java > line 1: > >>

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v3]

2023-11-02 Thread Jim Laskey
> Address changes from JEP 445 to JEP 463. > > - Move from a SYNTHETIC unnamed class to a MANDATED implicit class. > > - Don't mark class on read. > > - Remove reflection and annotation processing related to unnamed classes. > > - Simplify main method search. Jim Laskey has updated the pull

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v2]

2023-11-02 Thread Maurizio Cimadamore
On Wed, 1 Nov 2023 19:14:22 GMT, Jim Laskey wrote: >> Address changes from JEP 445 to JEP 463. >> >> - Move from a SYNTHETIC unnamed class to a MANDATED implicit class. >> >> - Don't mark class on read. >> >> - Remove reflection and annotation processing related to unnamed classes. >> >> -

Re: RFR: JDK-8319300: Remove unused methods in WorkArounds and Utils

2023-11-02 Thread Pavel Rappo
On Thu, 2 Nov 2023 10:16:10 GMT, Hannes Wallnöfer wrote: > Please review a simple removal of unused methods in `WorkArounds` and > `Utils`. > > `Utils.findClass(Element,String)` was the principal entry point of this > cluster of methods. It was last used by the `ThrowsTaglet` `inherit`

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v2]

2023-11-02 Thread Maurizio Cimadamore
On Wed, 1 Nov 2023 19:14:22 GMT, Jim Laskey wrote: >> Address changes from JEP 445 to JEP 463. >> >> - Move from a SYNTHETIC unnamed class to a MANDATED implicit class. >> >> - Don't mark class on read. >> >> - Remove reflection and annotation processing related to unnamed classes. >> >> -

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v2]

2023-11-02 Thread Maurizio Cimadamore
On Wed, 1 Nov 2023 19:14:22 GMT, Jim Laskey wrote: >> Address changes from JEP 445 to JEP 463. >> >> - Move from a SYNTHETIC unnamed class to a MANDATED implicit class. >> >> - Don't mark class on read. >> >> - Remove reflection and annotation processing related to unnamed classes. >> >> -

RFR: JDK-8319300: Remove unused methods in WorkArounds and Utils

2023-11-02 Thread Hannes Wallnöfer
Please review a simple removal of unused methods in `WorkArounds` and `Utils`. `Utils.findClass(Element,String)` was the principal entry point of this cluster of methods. It was last used by the `ThrowsTaglet` `inherit` method, but that code was removed in JDK-8295277. - Commit

RFR: 8288989: Make tests not to depend on the source code

2023-11-02 Thread Adam Sotona
Two langtool tests depend on the JDK source tree presence. This patch skips the tests execution in a source-less test environment. Please review. Thanks, Adam - Commit messages: - 8288989: Make tests not to depend on the source code Changes:

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v2]

2023-11-02 Thread Alan Bateman
On Wed, 1 Nov 2023 19:14:22 GMT, Jim Laskey wrote: >> Address changes from JEP 445 to JEP 463. >> >> - Move from a SYNTHETIC unnamed class to a MANDATED implicit class. >> >> - Don't mark class on read. >> >> - Remove reflection and annotation processing related to unnamed classes. >> >> -