
errorprone.bugpattern.SynchronizeOnNonFinalField.md Maven / Gradle / Ivy
The newest version!
Possible fixes:
* If the field is never reassigned, add the missing `final` modifier.
* If the field needs to be mutable, create a separate lock by adding a private
final field and synchronizing on it to guard all accesses.
* If the field is lazily initialized, annotation it with
`com.google.errorprone.annotations.concurrent.LazyInit`.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy