Replace JsonNode.textValue() with stringValue(null)

Apache 2.0

In Jackson 2, JsonNode.textValue() returns null for nodes that are not textual. In Jackson 3, textValue() delegates to stringValue(), which throws for nodes that are not strings. stringValue(null) keeps the Jackson 2 behavior of returning null.

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

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