< prev index next >
src/hotspot/share/classfile/resolutionErrors.cpp
Print this page
*** 63,75 ****
_error = e;
_error->increment_refcount();
}
void ResolutionErrorEntry::set_message(Symbol* c) {
- assert(c != NULL, "must set a value");
_message = c;
_message->increment_refcount();
}
// create new error entry
ResolutionErrorEntry* ResolutionErrorTable::new_entry(int hash, ConstantPool* pool,
int cp_index, Symbol* error,
--- 63,76 ----
_error = e;
_error->increment_refcount();
}
void ResolutionErrorEntry::set_message(Symbol* c) {
_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,95 ****
--- 86,98 ----
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 >