< prev index next >
src/hotspot/share/classfile/resolutionErrors.cpp
Print this page
@@ -63,13 +63,14 @@
_error = e;
_error->increment_refcount();
}
void ResolutionErrorEntry::set_message(Symbol* c) {
- assert(c != NULL, "must set a value");
_message = c;
+ if (_message != NULL) {
_message->increment_refcount();
+ }
}
// create new error entry
ResolutionErrorEntry* ResolutionErrorTable::new_entry(int hash, ConstantPool* pool,
int cp_index, Symbol* error,
@@ -85,11 +86,13 @@
void ResolutionErrorTable::free_entry(ResolutionErrorEntry *entry) {
// decrement error refcount
assert(entry->error() != NULL, "error should be set");
entry->error()->decrement_refcount();
+ if (entry->message() != NULL) {
entry->message()->decrement_refcount();
+ }
Hashtable<ConstantPool*, mtClass>::free_entry(entry);
}
// create resolution error table
< prev index next >