Rename Jackson 2.x methods to 3.x equivalents

Apache 2.0

Rename Jackson methods that were renamed in 3.x (e.g., writeObject() to writePOJO(), getCurrentValue() to currentValue()).

org.openrewrite.java.jackson.UpgradeJackson_2_3_MethodRenames
mod run . --recipe=org.openrewrite.java.jackson.UpgradeJackson_2_3_MethodRenames

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

Recipe list

It runs these recipes, in this order.

  1. Rename Jackson 2.x methods to 3.x equivalents for JsonGenerator
  2. Rename Jackson 2.x methods to 3.x equivalents for JsonParser
  3. Rename Jackson 2.x methods to 3.x equivalents for JsonNode
  4. Rename Jackson 2.x methods to 3.x equivalents for ObjectNode
  5. Change method name com.fasterxml.jackson.databind.type.TypeFactory defaultInstance() to createDefaultInstance
  6. Change method name com.fasterxml.jackson.databind.ObjectMapper getSerializationConfig() to serializationConfig
  7. Change method name com.fasterxml.jackson.databind.ObjectMapper getDeserializationConfig() to deserializationConfig
  8. Change method name com.fasterxml.jackson.databind.JsonMappingException.Reference getFieldName() to getPropertyName
  9. Reorder method arguments
  10. Change method name com.fasterxml.jackson.databind.SerializerProvider defaultSerializeValue(com.fasterxml.jackson.core.JsonGenerator, Object) to writeValue
  11. Change method name com.fasterxml.jackson.databind.SerializerProvider defaultSerializeField(String, Object, com.fasterxml.jackson.core.JsonGenerator) to defaultSerializeProperty
  12. Change method name com.fasterxml.jackson.databind.SerializerProvider defaultSerializeNull(com.fasterxml.jackson.core.JsonGenerator) to defaultSerializeNullValue
  13. Change method name com.fasterxml.jackson.databind.SerializerProvider findValueSerializer(*, com.fasterxml.jackson.databind.BeanProperty) to findContentValueSerializer