On Fri, 10 Jan 2025 16:06:32 GMT, Jaikiran Pai <j...@openjdk.org> wrote:
> [...] retain the previous order and first check for the suffix and if it's > not .java, only then do a stat system call. I started with that oder (before https://github.com/openjdk/jdk/pull/21910/commits/f0bd01d393a5d88e8b33723b7b4ca16379b97636) and it led to a regression when there's package `HelloWorld` and class named `java`, like in `HelloWorld/java.class`. See test/jdk/tools/launcher/SourceMode.testClassNamedJava() for details: https://github.com/openjdk/jdk/blob/1bf2f5c8a92b30eabb530737158f57c63a81fef6/test/jdk/tools/launcher/SourceMode.java#L265-L289 > Also a nit - the == JNI_TRUE isn't needed, just if (JLI_HasSuffix(arg, > ".java")) would be enough. True. Will remove the extra characters. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/21910#discussion_r1910601718