Find ResponseEntity(body, HttpStatus.OK) constructor calls

Proprietary

The two-argument ResponseEntity constructor with HttpStatus.OK is exactly what ResponseEntity.ok(body) produces — using the factory makes the 200-OK intent explicit and removes the dependency on HttpStatus. Save the constructor form for genuinely status-varying responses.

org.openrewrite.kotlin.spring.FindResponseEntityWithoutStatus$KtRecipe
mod run . --recipe='org.openrewrite.kotlin.spring.FindResponseEntityWithoutStatus$KtRecipe'

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