8000 Merge pull request #616 from mookkiah/issue_587_async-method-invocation · sithuhlaing/java-design-patterns@f47dc1e · GitHub
[go: up one dir, main page]

Skip to content

Commit f47dc1e

Browse files
authored
Merge pull request iluwatar#616 from mookkiah/issue_587_async-method-invocation
iluwatar#587 SonarQube reports bugs - async-method-invocation
2 parents 68d094a + 2a7feba commit f47dc1e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

async-method-invocation/src/main/java/com/iluwatar/async/method/invocation/ThreadAsyncExecutor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public T getValue() throws ExecutionException {
139139
@Override
140140
public void await() throws InterruptedException {
141141
synchronized (lock) {
142-
if (!isCompleted()) {
142+
while (!isCompleted()) {
143143
lock.wait();
144144
}
145145
}

0 commit comments

Comments
 (0)
0