On Fri, 5 May 2023 18:15:20 GMT, Vicente Romero <vrom...@openjdk.org> wrote:
>> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Typo > > src/jdk.compiler/share/classes/com/sun/tools/javac/launcher/Main.java line > 466: > >> 464: } catch (ClassNotFoundException e) { >> 465: throw new Fault(Errors.CantFindClass(mainClassName)); >> 466: } catch (NoSuchMethodException e) { > > `getDeclaredConstructor` can also throw a NSME but this error message would > still say that the main method couldn't be found unless at this point we are > sure that the class must have a no-args constructor I was avoiding moving things so not to change behaviour when not in preview, but I think I really need to break it down into separate try blocks; get method, get constructor, execute method. Let me attempt. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13689#discussion_r1186390633