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 {
|
public class ConditionChecker {
|
||||||
|
|
||||||
private volatile Boolean jobIsDone;
|
private volatile boolean jobIsDone;
|
||||||
private final Object lock = new Object();
|
private final Object lock = new Object();
|
||||||
|
|
||||||
public void ensureCondition() {
|
public void ensureCondition() {
|
||||||
|
|
Loading…
Reference in New Issue