< prev index next >

src/java.base/share/classes/java/util/concurrent/atomic/AtomicBoolean.java

Print this page
8234131: Miscellaneous changes imported from jsr166 CVS 2020-06
Reviewed-by: martin

*** 66,76 **** * Creates a new {@code AtomicBoolean} with the given initial value. * * @param initialValue the initial value */ public AtomicBoolean(boolean initialValue) { ! value = initialValue ? 1 : 0; } /** * Creates a new {@code AtomicBoolean} with initial value {@code false}. */ --- 66,77 ---- * Creates a new {@code AtomicBoolean} with the given initial value. * * @param initialValue the initial value */ public AtomicBoolean(boolean initialValue) { ! if (initialValue) ! value = 1; } /** * Creates a new {@code AtomicBoolean} with initial value {@code false}. */
< prev index next >