Find Jackson ObjectMapper() allocations inside collection lambdas

Proprietary

Allocating a fresh ObjectMapper per element rebuilds Jackson's module/serializer registry on every call. Hoist one mapper to a top-level property — it is thread-safe once configured.

org.openrewrite.kotlin.performance.FindObjectMapperInCollectionLambdas$KtRecipe
mod run . --recipe='org.openrewrite.kotlin.performance.FindObjectMapperInCollectionLambdas$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.