Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
bgColor#ccccff
class Safe {
  AtomicIntegerArray air = new AtomicIntegerArray(5);
  // other code
}
air.set(1, 10);

Risk Assessment

Assuming The assumption that the contents of a an array declared volatile, are volatile can lead to stale reads.

...