Synchronize mutable shared state

Proprietary

Finds var declarations at class level that lack @volatile or other synchronization annotations. Mutable shared state without synchronization is a common source of concurrency bugs.

org.openrewrite.scala.concurrency.SynchronizeMutableState
mod run . --recipe=org.openrewrite.scala.concurrency.SynchronizeMutableState

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.