RFR: 8302491: NoClassDefFoundError omits the original cause of an error [v7]

Coleen Phillimore coleenp at openjdk.org
Fri Mar 10 13:19:15 UTC 2023


On Thu, 9 Mar 2023 23:12:00 GMT, Ilarion Nakonechnyy <inakonechnyy at openjdk.org> wrote:

>> The proposed approach added a new function for getting the cause of an exception -`java_lang_Throwable::get_cause_simple `, that gets called within `InstanceKlass::add_initialization_error`  if an old one `java_lang_Throwable::get_cause_with_stack_trace` didn't succeed because of an exception during the VM call. The simple function doesn't call the VM for getting a stack trace but fills in any other information about an exception.
>> 
>> Besides that, the discovering information about an exception was added to `ConstantPoolCacheEntry::save_and_throw_indy_exc` function. 
>> 
>> Jtreg for reproducing the issue also was added to the commit. 
>> The commit was tested with tier1 tests.
>
> Ilarion Nakonechnyy has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Some corrections

This looks really good except the name I don't like.  Thanks for cleaning this up.

src/hotspot/share/classfile/javaClasses.cpp line 2758:

> 2756: 
> 2757:   Symbol* exception_name = vmSymbols::java_lang_ExceptionInInitializerError();
> 2758:   Handle h_eiie = Exceptions::new_exception(current, exception_name, st.as_string());

I don't like the h_eiie name.  I keep trying to pronounce it in English.  How about "initialization_error" ?  or "init_error"

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

Marked as reviewed by coleenp (Reviewer).

PR: https://git.openjdk.org/jdk/pull/12566


More information about the hotspot-dev mailing list