Modernize legacy jackson-core feature constants

Apache 2.0

Jackson 2.10 moved most flag constants out of JsonParser.Feature and JsonGenerator.Feature into the new JsonReadFeature / JsonWriteFeature (for JSON-specific flags) and StreamReadFeature / StreamWriteFeature (for format-agnostic flags). Jackson 3 keeps only the modern locations. This recipe rewrites every legacy constant to its Jackson 2-modern equivalent so the rest of the Jackson 2 → 3 pipeline (in particular the builder migrations) sees flags the modern API will accept.

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

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. Replace constant with another constant
  2. Replace constant with another constant
  3. Replace constant with another constant
  4. Replace constant with another constant
  5. Replace constant with another constant
  6. Replace constant with another constant
  7. Replace constant with another constant
  8. Replace constant with another constant
  9. Replace constant with another constant
  10. Replace constant with another constant
  11. Replace constant with another constant
  12. Replace constant with another constant
  13. Replace constant with another constant
  14. Replace constant with another constant
  15. Replace constant with another constant
  16. Replace constant with another constant
  17. Replace constant with another constant
  18. Replace constant with another constant
  19. Replace constant with another constant
  20. Replace constant with another constant
  21. Replace constant with another constant
  22. Replace constant with another constant
  23. Replace constant with another constant
  24. Replace constant with another constant
  25. Replace constant with another constant
  26. Replace constant with another constant
  27. Replace constant with another constant
  28. Replace constant with another constant
  29. Replace constant with another constant
  30. Replace constant with another constant
  31. Replace constant with another constant
  32. Replace constant with another constant
  33. Replace constant with another constant
  34. Replace constant with another constant