Versions Compared

Key

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

...

Noncompliant Code Example (partial initialization)

Classes with threadThread-safe sub-objects classes (which may not be strictly immutable) must not use nonfinal and nonvolatile fields to ensure that no thread sees any field references before the sub-objects' initialization has concluded. This noncompliant code example does not declare the map field as volatile or final.

...