openrewrite / rewrite-apache

OpenRewrite recipes for Apache projects.
Apache License 2.0
2 stars 5 forks source link

`org.apache.commons.lang3.CharEncoding` to `StandardCharsets` #4

Open yeikel opened 2 years ago

yeikel commented 2 years ago

/**
 * <p>Character encoding names required of every implementation of the Java platform.</p>
 * @deprecated Java 7 introduced {@link java.nio.charset.StandardCharsets}, which defines these constants as
 * {@link Charset} objects. Use {@link Charset#name()} to get the string values provided in this class.
 * This class will be removed in a future release.
 */
@Deprecated
public class CharEncoding {

Relevant issue : https://github.com/openrewrite/rewrite/issues/1724

pway99 commented 2 years ago

just for reference here is an existing recipe related to apache.commons.io.Charsets

https://github.com/openrewrite/rewrite-migrate-java/blob/79cb372588e62db20380a5f82052cbbad771201f/src/main/resources/META-INF/rewrite/apache-commons-io.yml#L45

https://commons.apache.org/proper/commons-lang/apidocs/org/apache/commons/lang3/CharEncoding.html