Simplify AssertJ assertions on == and != comparisons
MSALReplace assertThat(x == y).isTrue() and its variants with the dedicated assertion for whatever == actually compares: assertThat(x).isNull() against the null literal, assertThat(x).isEqualTo(y) when either operand is a primitive and the comparison is therefore by value, and assertThat(x).isSameAs(y) when both operands are reference types. Floating point operands are left alone, as == and isEqualTo disagree on NaN and -0.0.
org. openrewrite. java. testing. assertj. SimplifyAssertJEqualityAssertionmod run . --recipe= org. openrewrite. java. testing. assertj. SimplifyAssertJEqualityAssertionInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.