On Tue, 16 Apr 2024 10:03:21 GMT, David Holmes <dhol...@openjdk.org> wrote:

>> Jan Lahoda has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Reflecting review feedback.
>
> src/java.base/share/native/libjli/java.c line 419:
> 
>> 417: invokeInstanceMainWithArgs(JNIEnv *env, jclass mainClass, jobjectArray 
>> mainArgs) {
>> 418:     jmethodID constructor = (*env)->GetMethodID(env, mainClass, 
>> "<init>", "()V");
>> 419:     CHECK_EXCEPTION_FAIL();
> 
> Shouldn't this also not be checked until you know you have an instance method?

You mean to first check whether the method exists, and only then try to lookup 
the constructor? Not sure if that has observable effects, but I can do that.

I missed [JDK-8329581](https://bugs.openjdk.org/browse/JDK-8329581) before, my 
plan is to adjust this "check for exception and clear it" check to only work 
for `NoSuchMethodError`, and let the exception pass for any other exception.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18753#discussion_r1567361164

Reply via email to