src/hotspot/share/oops/constantPool.cpp
changeset 51486 67b55f3c45eb
parent 51444 3e5d28e6de32
child 52062 8dbf1a13af49
--- a/src/hotspot/share/oops/constantPool.cpp	Wed Aug 22 13:06:33 2018 +0200
+++ b/src/hotspot/share/oops/constantPool.cpp	Wed Aug 22 07:51:07 2018 -0400
@@ -769,10 +769,14 @@
 void ConstantPool::throw_resolution_error(const constantPoolHandle& this_cp, int which, TRAPS) {
   Symbol* message = NULL;
   Symbol* error = SystemDictionary::find_resolution_error(this_cp, which, &message);
-  assert(error != NULL && message != NULL, "checking");
+  assert(error != NULL, "checking");
   CLEAR_PENDING_EXCEPTION;
-  ResourceMark rm;
-  THROW_MSG(error, message->as_C_string());
+  if (message != NULL) {
+    ResourceMark rm;
+    THROW_MSG(error, message->as_C_string());
+  } else {
+    THROW(error);
+  }
 }
 
 // If resolution for Class, Dynamic constant, MethodHandle or MethodType fails, save the