In `G1FullGCAdjustTask`, the following code is for updating pointers to the new locations of objects. This is after ref-processing phase, so discovered lists are empty; all elements are either dropped or pushed onto the pending list. Therefore, the `weak_oops_do` call is a no-op.
```
// Adjust the weak roots.
if (!Atomic::cmpxchg(&_references_done, false, true)) {
G1CollectedHeap::heap()->ref_processor_stw()->weak_oops_do(&_adjust);
}
AlwaysTrueClosure always_alive;
_weak_proc_task.work(worker_id, &always_alive, &_adjust);
```
The Serial and Parallel collector also have the same issue, in `genCollectedHeap.cpp` and `psParallelCompact.cpp` respectively.
```
// Adjust the weak roots.
if (!Atomic::cmpxchg(&_references_done, false, true)) {
G1CollectedHeap::heap()->ref_processor_stw()->weak_oops_do(&_adjust);
}
AlwaysTrueClosure always_alive;
_weak_proc_task.work(worker_id, &always_alive, &_adjust);
```
The Serial and Parallel collector also have the same issue, in `genCollectedHeap.cpp` and `psParallelCompact.cpp` respectively.