diff --git a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicBoolean.java b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicBoolean.java index 9e2acf5535c..caff3c423e3 100644 --- a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicBoolean.java +++ b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicBoolean.java @@ -68,7 +68,9 @@ public class AtomicBoolean implements java.io.Serializable { * @param initialValue the initial value */ public AtomicBoolean(boolean initialValue) { - value = initialValue ? 1 : 0; + if (initialValue) { + value = 1; + } } /**