--- a/src/hotspot/share/utilities/exceptions.cpp Fri May 18 15:35:32 2018 +0200
+++ b/src/hotspot/share/utilities/exceptions.cpp Fri May 18 09:15:08 2018 -0700
@@ -264,23 +264,10 @@
if (!thread->has_pending_exception()) {
assert(klass != NULL, "klass must exist");
- // We are about to create an instance - so make sure that klass is initialized
- InstanceKlass* ik = InstanceKlass::cast(klass);
- ik->initialize(thread);
- if (!thread->has_pending_exception()) {
- // Allocate new exception
- h_exception = ik->allocate_instance_handle(thread);
- if (!thread->has_pending_exception()) {
- JavaValue result(T_VOID);
- args->set_receiver(h_exception);
- // Call constructor
- JavaCalls::call_special(&result, ik,
- vmSymbols::object_initializer_name(),
+ h_exception = JavaCalls::construct_new_instance(InstanceKlass::cast(klass),
signature,
args,
thread);
- }
- }
}
// Check if another exception was thrown in the process, if so rethrow that one