PrimitiveAtomicReference
Using compareAndSet with boxed primitives is dangerous, as reference rather than value equality is used. Consider using AtomicInteger, AtomicLong, or AtomicBoolean instead.

Severity
WARNING
Has Fix?
REQUIRES_HUMAN_ATTENTION

The problem

Suppression

Suppress false positives by adding the suppression annotation @SuppressWarnings("PrimitiveAtomicReference") to the enclosing element.