Update Jackson 2.x types to 3.x

Apache 2.0

Update Jackson type names including exception types and core class renames.

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

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. Change type YAMLParser$Feature to YAMLReadFeature
  2. Change type YAMLGenerator$Feature to YAMLWriteFeature
  3. Change type FromXmlParser$Feature to XmlReadFeature
  4. Change type ToXmlGenerator$Feature to XmlWriteFeature
  5. Change type CsvParser$Feature to CsvReadFeature
  6. Change type CsvGenerator$Feature to CsvWriteFeature
  7. Change type CBORGenerator$Feature to CBORWriteFeature
  8. Change type AvroParser$Feature to AvroReadFeature
  9. Change type AvroGenerator$Feature to AvroWriteFeature
  10. Change type SmileParser$Feature to SmileReadFeature
  11. Change type SmileGenerator$Feature to SmileWriteFeature
  12. Change type IonParser$Feature to IonReadFeature
  13. Change type IonGenerator$Feature to IonWriteFeature
  14. Change type JsonParseException to StreamReadException
  15. Change type JsonGenerationException to StreamWriteException
  16. Change type JsonProcessingException to JacksonException
  17. Change type JsonEOFException to UnexpectedEndOfInputException
  18. Change type ObjectMapper$DefaultTyping to DefaultTyping
  19. Change type JsonMappingException to DatabindException
  20. Change type com.fasterxml.jackson.core.JsonFactory to tools.jackson.core.json.JsonFactory
  21. Change type com.fasterxml.jackson.core.JsonFactoryBuilder to tools.jackson.core.json.JsonFactoryBuilder
  22. Change type JsonStreamContext to TokenStreamContext
  23. Change type JsonLocation to TokenStreamLocation
  24. Change type BeanDeserializerModifier to ValueDeserializerModifier
  25. Change type BeanSerializerModifier to ValueSerializerModifier
  26. Change type JsonDeserializer to ValueDeserializer
  27. Change type JsonSerializer to ValueSerializer
  28. Change type JsonSerializable to JacksonSerializable
  29. Change type SerializerProvider to SerializationContext
  30. Change type TextNode to StringNode
  31. Change type Module to JacksonModule
  32. Change type com.fasterxml.jackson.databind.ser.impl.SimpleFilterProvider to tools.jackson.databind.ser.std.SimpleFilterProvider
  33. Change type com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter to tools.jackson.databind.ser.std.SimpleBeanPropertyFilter
  34. Change type ContainerSerializer to StdContainerSerializer
  35. Remove interface implementations com.fasterxml.jackson.databind.deser.ContextualDeserializer
  36. Remove interface implementations com.fasterxml.jackson.databind.ser.ContextualSerializer
  37. Change type PropertyNamingStrategy to PropertyNamingStrategies
  38. Change type com.fasterxml.jackson.databind.PropertyNamingStrategy.SnakeCaseStrategy to tools.jackson.databind.PropertyNamingStrategies.SnakeCaseStrategy
  39. Change type com.fasterxml.jackson.databind.PropertyNamingStrategy.UpperCamelCaseStrategy to tools.jackson.databind.PropertyNamingStrategies.UpperCamelCaseStrategy
  40. Change type com.fasterxml.jackson.databind.PropertyNamingStrategy.LowerCamelCaseStrategy to tools.jackson.databind.PropertyNamingStrategies.LowerCamelCaseStrategy
  41. Change type com.fasterxml.jackson.databind.PropertyNamingStrategy.KebabCaseStrategy to tools.jackson.databind.PropertyNamingStrategies.KebabCaseStrategy
  42. Change type com.fasterxml.jackson.databind.PropertyNamingStrategy.LowerDotCaseStrategy to tools.jackson.databind.PropertyNamingStrategies.LowerDotCaseStrategy
  43. Change type com.fasterxml.jackson.databind.PropertyNamingStrategy.LowerCaseStrategy to tools.jackson.databind.PropertyNamingStrategies.LowerCaseStrategy