8254146: Avoid unnecessary volatile write on new AtomicBoolean(false)
Reviewed-by: redestad, rriggs, chegar
This commit is contained in:
parent
6d13c766bf
commit
7e82ba1ff0
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user