Versions Compared

Key

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

...

The class is made final to prevent subclasses from overriding the clone() method. This enables the class to be accessed and used, while preventing the fields from being modified, and complies with OBJ36-J. Provide mutable classes with a clone method when passing instances to untrusted code.

Noncompliant Code Example

...