In `G1ParScanThreadStateSet::flush`:
```
for (uint worker_id = 0; worker_id < _n_workers; ++worker_id) {
G1ParScanThreadState* pss = _states[worker_id];
if (pss == NULL) {
continue;
}
...
```
A similar `if` check exists in `G1ParScanThreadStateSet::record_unused_optional_region`.
However, `_states` array is lazy-initialized by each worker thread, so all array slots contain non-null value.
Replace the if with a non-null assert.
```
for (uint worker_id = 0; worker_id < _n_workers; ++worker_id) {
G1ParScanThreadState* pss = _states[worker_id];
if (pss == NULL) {
continue;
}
...
```
A similar `if` check exists in `G1ParScanThreadStateSet::record_unused_optional_region`.
However, `_states` array is lazy-initialized by each worker thread, so all array slots contain non-null value.
Replace the if with a non-null assert.