Versions Compared

Key

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

...

This noncompliant code example does not close the input stream and, consequently, also violates guideline rule FIO06-J. Ensure all resources are properly closed when they are no longer needed.

...

This noncompliant code example uses a ReentrantLock to protect a java.util.Date instance, which is not thread-safe by design. The doSomethingSafely() method must catch Throwable to comply with guideline rule ERR06-J. Do not allow exceptions to expose sensitive information.

...