Versions Compared

Key

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

...

This compliant solution does not use Collections.synchronizedMap() because locking on the (unsynchronized) map provides sufficient thread-safety for this application. The guideline CON02-J. Do not synchronize on global constantsobjects that may be reused enlists certain objects that should not be used for synchronization purposes, including any object returned by Collections.synchronizedMap().

...