RFR: 8048190: NoClassDefFoundError omits original ExceptionInInitializerError [v5]
Coleen Phillimore
coleenp at openjdk.java.net
Mon Aug 9 23:24:32 UTC 2021
On Mon, 9 Aug 2021 22:40:16 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fix java.base/bootstrap class loader comment.
>
> src/hotspot/share/classfile/javaClasses.cpp line 2685:
>
>> 2683: assert(stack_trace->is_objArray(), "Should be an array");
>> 2684:
>> 2685: // If the original exception was in the bootstrap class loader, then use that
>
> Not sure that is a sufficiently strong enough check due to -Xbootclasspath:/a. You may need to check actual java.base module.
I don't know. The worry was that the exception would be unloaded, which it won't if it's in the bootstrap class loader.
> test/hotspot/jtreg/runtime/ClassInitErrors/InitExceptionUnloadTest.java line 28:
>
>> 26: * @bug 8048190
>> 27: * @summary Test that the NCDFE saves original exception during class initialization,
>> 28: * and doesn't cause the classes in the stacktrace to be unloaded.
>
> Don't you mean "and doesn't prevent the classes in the stacktrace from being unloaded"?
yes.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4996
More information about the hotspot-dev
mailing list