src/hotspot/share/oops/constantPool.cpp
changeset 47532 d8e417df3468
parent 47216 71c04702a3d5
child 47549 0a0fae0c05ac
--- a/src/hotspot/share/oops/constantPool.cpp	Tue Sep 26 06:53:35 2017 -0400
+++ b/src/hotspot/share/oops/constantPool.cpp	Tue Sep 26 10:03:17 2017 -0400
@@ -135,6 +135,16 @@
   return (objArrayOop)_cache->resolved_references();
 }
 
+// Called from outside constant pool resolution where a resolved_reference array
+// may not be present.
+objArrayOop ConstantPool::resolved_references_or_null() const {
+  if (_cache == NULL) {
+    return NULL;
+  } else {
+    return (objArrayOop)_cache->resolved_references();
+  }
+}
+
 // Create resolved_references array and mapping array for original cp indexes
 // The ldc bytecode was rewritten to have the resolved reference array index so need a way
 // to map it back for resolving and some unlikely miscellaneous uses.