Inspectopedia
 
2024.3

Non-private field accessed in 'synchronized' context

Warning
New
Last modified: 03 December 2024

Reports non-final, non-private fields that are accessed in a synchronized context.

A non-private field cannot be guaranteed to always be accessed in a synchronized manner, and such "partially synchronized" access may result in unexpectedly inconsistent data structures.

Example: