Versions Compared

Key

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

...

The guideline CON04-J. Synchronize using an internal private final lock object recommends documenting the locking strategy of classes designed for inheritance. This information is useful for deciding the locking strategy of subclasses.

...

This compliant solution does not violate CON04-J. Synchronize using an internal private final lock object because the accessibility of the class is package-private which is allowable when untrusted code cannot infiltrate the package.

...

This noncompliant code example defines a doSomething() method in class Base that uses an internal private lock, in accordance with CON04-J. Synchronize using an internal private final lock object.

...