`SafepointSynchronize::thread_not_running` starts by checking if the current state is `is_running`:
```
bool SafepointSynchronize::thread_not_running(ThreadSafepointState *cur_state) {
if (!cur_state->is_running()) {
return true;
}
...
}
```
However, this has been asserted by the caller, `SafepointSynchronize::synchronize_threads`.
## call site 1
```
for (; JavaThread *cur = jtiwh.next(); ) {
assert(cur->safepoint_state()->is_running(), "Illegal initial state");
}
...
if (thread_not_running(cur_tss)) {
```
## call site 2
```
assert(cur_tss->is_running(), "Illegal initial state");
if (thread_not_running(cur_tss)) {
```
Therefore, `!cur_state->is_running()` is always false, and the `if` is just skipped.
```
bool SafepointSynchronize::thread_not_running(ThreadSafepointState *cur_state) {
if (!cur_state->is_running()) {
return true;
}
...
}
```
However, this has been asserted by the caller, `SafepointSynchronize::synchronize_threads`.
## call site 1
```
for (; JavaThread *cur = jtiwh.next(); ) {
assert(cur->safepoint_state()->is_running(), "Illegal initial state");
}
...
if (thread_not_running(cur_tss)) {
```
## call site 2
```
assert(cur_tss->is_running(), "Illegal initial state");
if (thread_not_running(cur_tss)) {
```
Therefore, `!cur_state->is_running()` is always false, and the `if` is just skipped.