Merge pull request #15316 from eugenp/ulisseslima-patch-bael-7022
BAEL-7022 Why wait must be called in a synchronized block - quick fix
This commit is contained in:
commit
564de403df
|
@ -2,7 +2,7 @@ package com.baeldung.wait_synchronization;
|
|||
|
||||
public class ConditionChecker {
|
||||
|
||||
private volatile Boolean jobIsDone;
|
||||
private volatile boolean jobIsDone;
|
||||
private final Object lock = new Object();
|
||||
|
||||
public void ensureCondition() {
|
||||
|
@ -21,4 +21,4 @@ public class ConditionChecker {
|
|||
lock.notify();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue