File tree Expand file tree Collapse file tree
src/main/resources/META-INF/rewrite Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9193,6 +9193,34 @@ examples:
91939193 language: java
91949194 ---
91959195type : specs.openrewrite.org/v1beta/example
9196+ recipeName : org.openrewrite.java.migrate.nio.file.RedundantUtf8Charset
9197+ examples :
9198+ - description : ' `RedundantUtf8CharsetTest#readString`'
9199+ sources :
9200+ - before : |
9201+ import java.io.IOException;
9202+ import java.nio.charset.StandardCharsets;
9203+ import java.nio.file.Files;
9204+ import java.nio.file.Path;
9205+
9206+ class Test {
9207+ String read(Path path) throws IOException {
9208+ return Files.readString(path, StandardCharsets.UTF_8);
9209+ }
9210+ }
9211+ after: |
9212+ import java.io.IOException;
9213+ import java.nio.file.Files;
9214+ import java.nio.file.Path;
9215+
9216+ class Test {
9217+ String read(Path path) throws IOException {
9218+ return Files.readString(path);
9219+ }
9220+ }
9221+ language: java
9222+ ---
9223+ type : specs.openrewrite.org/v1beta/example
91969224recipeName : org.openrewrite.java.migrate.search.AboutJavaVersion
91979225examples :
91989226- description : ' `AboutJavaVersionTest#aboutJavaVersion`'
You can’t perform that action at this time.
0 commit comments