< prev index next >

src/hotspot/share/opto/parse3.cpp

Print this page
rev 55090 : secret-sfac

@@ -56,14 +56,14 @@
   // other threads, or the transition from interpreted to compiled code would
   // need to be guarded.
   ciInstanceKlass *field_holder = field->holder();
 
   if (method->holder()->is_subclass_of(field_holder)) {
-    if (method->is_static_initializer()) {
+    if (method->is_class_initializer()) {
       // OK to access static fields inside initializer
       return true;
-    } else if (method->is_object_initializer()) {
+    } else if (method->is_object_constructor()) {
       // It's also OK to access static fields inside a constructor,
       // because any thread calling the constructor must first have
       // synchronized on the class by executing a '_new' bytecode.
       return true;
     }
< prev index next >