src/hotspot/share/runtime/serviceThread.cpp
changeset 50217 843fc56f4686
parent 49449 ef5d5d343e2a
child 50445 bd6b78feb6a3
--- a/src/hotspot/share/runtime/serviceThread.cpp	Fri May 18 15:35:32 2018 +0200
+++ b/src/hotspot/share/runtime/serviceThread.cpp	Fri May 18 09:15:08 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -39,19 +39,13 @@
 void ServiceThread::initialize() {
   EXCEPTION_MARK;
 
-  InstanceKlass* klass = SystemDictionary::Thread_klass();
-  instanceHandle thread_oop = klass->allocate_instance_handle(CHECK);
-
   const char* name = "Service Thread";
-
   Handle string = java_lang_String::create_from_str(name, CHECK);
 
   // Initialize thread_oop to put it into the system threadGroup
   Handle thread_group (THREAD, Universe::system_thread_group());
-  JavaValue result(T_VOID);
-  JavaCalls::call_special(&result, thread_oop,
-                          klass,
-                          vmSymbols::object_initializer_name(),
+  Handle thread_oop = JavaCalls::construct_new_instance(
+                          SystemDictionary::Thread_klass(),
                           vmSymbols::threadgroup_string_void_signature(),
                           thread_group,
                           string,