src/hotspot/share/classfile/resolutionErrors.cpp
changeset 51486 67b55f3c45eb
parent 51375 b812a85b3aa4
--- a/src/hotspot/share/classfile/resolutionErrors.cpp	Wed Aug 22 13:06:33 2018 +0200
+++ b/src/hotspot/share/classfile/resolutionErrors.cpp	Wed Aug 22 07:51:07 2018 -0400
@@ -65,9 +65,10 @@
 }
 
 void ResolutionErrorEntry::set_message(Symbol* c) {
-  assert(c != NULL, "must set a value");
   _message = c;
-  _message->increment_refcount();
+  if (_message != NULL) {
+    _message->increment_refcount();
+  }
 }
 
 // create new error entry
@@ -87,7 +88,9 @@
   // decrement error refcount
   assert(entry->error() != NULL, "error should be set");
   entry->error()->decrement_refcount();
-  entry->message()->decrement_refcount();
+  if (entry->message() != NULL) {
+    entry->message()->decrement_refcount();
+  }
   Hashtable<ConstantPool*, mtClass>::free_entry(entry);
 }