src/hotspot/share/oops/method.cpp
changeset 55105 9ad765641e8f
parent 55005 9b70ebd131b4
child 55206 2fe2063fe567
--- a/src/hotspot/share/oops/method.cpp	Thu May 30 11:42:53 2019 +0200
+++ b/src/hotspot/share/oops/method.cpp	Thu May 30 13:39:13 2019 +0300
@@ -704,6 +704,10 @@
    return name() == vmSymbols::object_initializer_name();
 }
 
+bool Method::needs_clinit_barrier() const {
+  return is_static() && !method_holder()->is_initialized();
+}
+
 objArrayHandle Method::resolved_checked_exceptions_impl(Method* method, TRAPS) {
   int length = method->checked_exceptions_length();
   if (length == 0) {  // common case