BAEL-7022 Why wait must be called in a synchronized block - Changing Boolean to primitive

Based on a comment.
This commit is contained in:
Ulisses Lima 2023-11-28 12:14:50 -03:00 committed by GitHub
parent 331fb9a477
commit 7b5225e8db
1 changed files with 2 additions and 2 deletions

View File

@ -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();
}
}
}
}