hotspot/src/share/vm/ci/ciInstanceKlass.cpp
changeset 8725 8c1e3dd5fe1b
parent 8314 057b1c20fd7e
child 10546 e79347eebbc5
--- a/hotspot/src/share/vm/ci/ciInstanceKlass.cpp	Fri Mar 18 15:52:42 2011 -0700
+++ b/hotspot/src/share/vm/ci/ciInstanceKlass.cpp	Fri Mar 18 16:00:34 2011 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2011, 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
@@ -85,7 +85,6 @@
     if (h_k() != SystemDictionary::Object_klass()) {
       super();
     }
-    java_mirror();
     //compute_nonstatic_fields();  // done outside of constructor
   }
 
@@ -320,6 +319,9 @@
 // Get the instance of java.lang.Class corresponding to this klass.
 // Cache it on this->_java_mirror.
 ciInstance* ciInstanceKlass::java_mirror() {
+  if (is_shared()) {
+    return ciKlass::java_mirror();
+  }
   if (_java_mirror == NULL) {
     _java_mirror = ciKlass::java_mirror();
   }