Re: RFR: 8357016: Candidate main methods not computed properly [v4]

2025-05-18 Thread Jaikiran Pai
On Mon, 19 May 2025 03:49:20 GMT, Jan Lahoda wrote: >> A consider class like this: >> >> >> public class TwoMains { >> private static void main(String... args) {} >> static void main() { >> System.out.println("Should be called, but is not."); >> } >> } >> >> >> The `Method

Re: RFR: 8357016: Candidate main methods not computed properly [v4]

2025-05-18 Thread Jan Lahoda
> A consider class like this: > > > public class TwoMains { > private static void main(String... args) {} > static void main() { > System.out.println("Should be called, but is not."); > } > } > > > The `MethodFinder` will do lookup for the `main(String[])` method, and it >

Re: RFR: 8357016: Candidate main methods not computed properly [v3]

2025-05-16 Thread Vicente Romero
On Fri, 16 May 2025 11:54:07 GMT, Jan Lahoda wrote: >> A consider class like this: >> >> >> public class TwoMains { >> private static void main(String... args) {} >> static void main() { >> System.out.println("Should be called, but is not."); >> } >> } >> >> >> The `Method

Re: RFR: 8357016: Candidate main methods not computed properly [v3]

2025-05-16 Thread Jaikiran Pai
On Fri, 16 May 2025 11:54:07 GMT, Jan Lahoda wrote: >> A consider class like this: >> >> >> public class TwoMains { >> private static void main(String... args) {} >> static void main() { >> System.out.println("Should be called, but is not."); >> } >> } >> >> >> The `Method

Re: RFR: 8357016: Candidate main methods not computed properly [v3]

2025-05-16 Thread Jan Lahoda
> A consider class like this: > > > public class TwoMains { > private static void main(String... args) {} > static void main() { > System.out.println("Should be called, but is not."); > } > } > > > The `MethodFinder` will do lookup for the `main(String[])` method, and it >

Re: RFR: 8357016: Candidate main methods not computed properly [v2]

2025-05-16 Thread Jaikiran Pai
On Fri, 16 May 2025 11:12:08 GMT, Jan Lahoda wrote: >> A consider class like this: >> >> >> public class TwoMains { >> private static void main(String... args) {} >> static void main() { >> System.out.println("Should be called, but is not."); >> } >> } >> >> >> The `Method

Re: RFR: 8357016: Candidate main methods not computed properly [v2]

2025-05-16 Thread Jaikiran Pai
On Fri, 16 May 2025 11:02:54 GMT, Jan Lahoda wrote: >> src/java.base/share/classes/sun/launcher/resources/launcher.properties line >> 283: >> >>> 281: make inner class static or move inner class out to separate source >>> file >>> 282: java.launcher.cls.error8=\ >>> 283: Error: abstrac

Re: RFR: 8357016: Candidate main methods not computed properly [v2]

2025-05-16 Thread Vicente Romero
On Fri, 16 May 2025 11:12:08 GMT, Jan Lahoda wrote: >> A consider class like this: >> >> >> public class TwoMains { >> private static void main(String... args) {} >> static void main() { >> System.out.println("Should be called, but is not."); >> } >> } >> >> >> The `Method

Re: RFR: 8357016: Candidate main methods not computed properly [v2]

2025-05-16 Thread Jan Lahoda
> A consider class like this: > > > public class TwoMains { > private static void main(String... args) {} > static void main() { > System.out.println("Should be called, but is not."); > } > } > > > The `MethodFinder` will do lookup for the `main(String[])` method, and it >

Re: RFR: 8357016: Candidate main methods not computed properly [v2]

2025-05-16 Thread Jan Lahoda
On Fri, 16 May 2025 10:07:36 GMT, Jaikiran Pai wrote: >> Jan Lahoda has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Adding tests as suggested. > > test/jdk/tools/launcher/Arrrghs.java line 607: > >> 605: //private method with pa

Re: RFR: 8357016: Candidate main methods not computed properly

2025-05-16 Thread Jan Lahoda
On Fri, 16 May 2025 10:10:17 GMT, Jaikiran Pai wrote: >> A consider class like this: >> >> >> public class TwoMains { >> private static void main(String... args) {} >> static void main() { >> System.out.println("Should be called, but is not."); >> } >> } >> >> >> The `Meth

Re: RFR: 8357016: Candidate main methods not computed properly

2025-05-16 Thread Jaikiran Pai
On Thu, 15 May 2025 16:42:48 GMT, Jan Lahoda wrote: > A consider class like this: > > > public class TwoMains { > private static void main(String... args) {} > static void main() { > System.out.println("Should be called, but is not."); > } > } > > > The `MethodFinder` will

Re: RFR: 8357016: Candidate main methods not computed properly

2025-05-16 Thread Jaikiran Pai
On Thu, 15 May 2025 16:42:48 GMT, Jan Lahoda wrote: > A consider class like this: > > > public class TwoMains { > private static void main(String... args) {} > static void main() { > System.out.println("Should be called, but is not."); > } > } > > > The `MethodFinder` will

Re: RFR: 8357016: Candidate main methods not computed properly

2025-05-16 Thread Jaikiran Pai
On Thu, 15 May 2025 16:42:48 GMT, Jan Lahoda wrote: > A consider class like this: > > > public class TwoMains { > private static void main(String... args) {} > static void main() { > System.out.println("Should be called, but is not."); > } > } > > > The `MethodFinder` will

RFR: 8357016: Candidate main methods not computed properly

2025-05-15 Thread Jan Lahoda
A consider class like this: public class TwoMains { private static void main(String... args) {} static void main() { System.out.println("Should be called, but is not."); } } The `MethodFinder` will do lookup for the `main(String[])` method, and it finds one, so does not pro