| JDK 18 |
|---|
| 18Resolved |
|
Duplicate :
|
|
|
Relates :
|
|
|
Relates :
|
Method* Method::checked_resolve_jmethod_id(jmethodID mid) {
if (mid == NULL) return NULL;
Method* o = resolve_jmethod_id(mid);
if (o == NULL || o == JNIMethodBlock::_free_method || !((Metadata*)o)->is_method()) {
return NULL;
}
return o;
};
We could, in addition, test that:
- Method* is a valid metaspace pointer
- Method* is a method
see Metaspace::contains() and Method::is_valid_method(), respectively.
Can be done either unconditionally, or at least as assert, if it costs too much time.
|