AtomicBoolean, AtomicInteger, and AtomicLong equality checks compare their values
MSALAtomicBoolean#equals(Object), AtomicInteger#equals(Object) and AtomicLong#equals(Object) are only equal to their instance. This recipe converts a.equals(b) to a.get() == b.get(). These atomic classes do not override equals from Object, so calling it compares object identity rather than the wrapped value, which is almost never the intended behavior.
org. openrewrite. staticanalysis. AtomicPrimitiveEqualsUsesGetmod run . --recipe= org. openrewrite. staticanalysis. AtomicPrimitiveEqualsUsesGetInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.