src/hotspot/share/runtime/sharedRuntime.cpp
changeset 54752 3fbaea4b1f1c
parent 54623 1126f0607c70
child 55105 9ad765641e8f
child 58678 9cf78a70fa4f
--- a/src/hotspot/share/runtime/sharedRuntime.cpp	Tue May 07 14:05:09 2019 -0700
+++ b/src/hotspot/share/runtime/sharedRuntime.cpp	Tue May 07 17:33:19 2019 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -1376,18 +1376,12 @@
   }
 #endif
 
-  // Do not patch call site for static call to another class
-  // when the class is not fully initialized.
-  if (invoke_code == Bytecodes::_invokestatic) {
-    if (!callee_method->method_holder()->is_initialized() &&
-        callee_method->method_holder() != caller_nm->method()->method_holder()) {
-      assert(callee_method->method_holder()->is_linked(), "must be");
-      return callee_method;
-    } else {
-      assert(callee_method->method_holder()->is_initialized() ||
-             callee_method->method_holder()->is_reentrant_initialization(thread),
-             "invalid class initialization state for invoke_static");
-    }
+  // Do not patch call site for static call when the class is not
+  // fully initialized.
+  if (invoke_code == Bytecodes::_invokestatic &&
+      !callee_method->method_holder()->is_initialized()) {
+    assert(callee_method->method_holder()->is_linked(), "must be");
+    return callee_method;
   }
 
   // JSR 292 key invariant: