< prev index next >

src/hotspot/share/oops/constMethod.cpp

Print this page
@@ -418,11 +418,12 @@
  }
  
  void ConstMethod::metaspace_pointers_do(MetaspaceClosure* it) {
    log_trace(cds)("Iter(ConstMethod): %p", this);
  
-   if (!method()->method_holder()->is_rewritten()) {
+   if (constants()->pool_holder() != nullptr && !method()->method_holder()->is_rewritten()) {
+     // holder is null for MH intrinsic methods
      it->push(&_constants, MetaspaceClosure::_writable);
    } else {
      it->push(&_constants);
    }
    it->push(&_stackmap_data);
< prev index next >