Versions Compared

Key

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

...

When defensive copying is necessary, make the defensive copies before parameter validation; validate the copies rather than the original parameters. ( See guideline SER07-J. Make defensive copies of private mutable components for additional information.)

Noncompliant Code Example

...