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:
Loredana Crusoveanu
2023-11-29 10:57:03 +02:00
committed by GitHub
@@ -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();
}
}
}
}