From 1601b05dc35bb8b6c5f817620179d2c971655b55 Mon Sep 17 00:00:00 2001 From: Markus KARG Date: Thu, 12 Dec 2024 14:05:59 +0000 Subject: [PATCH] Add violation for FileReader --- .../src/main/resources/modernizer.xml | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/modernizer-maven-plugin/src/main/resources/modernizer.xml b/modernizer-maven-plugin/src/main/resources/modernizer.xml index 024c002..224728c 100644 --- a/modernizer-maven-plugin/src/main/resources/modernizer.xml +++ b/modernizer-maven-plugin/src/main/resources/modernizer.xml @@ -1265,6 +1265,18 @@ violation names use the same format that javap emits. Prefer java.nio.file.Files.newOutputStream(java.nio.file.Path, java.nio.file.StandardOpenOption.CREATE, java.nio.file.StandardOpenOption.CREATE) + + java/io/FileReader."<init>":(Ljava/io/File;)V + 7 + Prefer java.nio.file.Files.newBufferedReader.<init>(java.nio.file.Path) + + + + java/io/FileReader."<init>":(Ljava/lang/String;)V + 7 + Prefer java.nio.file.Files.newBufferedReader.<init>(java.nio.file.Paths.get(String)) + + java/io/FileReader."<init>":(Ljava/io/File;)V 11 @@ -1277,6 +1289,18 @@ violation names use the same format that javap emits. Prefer java.io.FileReader.<init>(String, Charset) + + java/io/FileReader."<init>":(Ljava/io/File;Ljava/nio/Charset;)V + 11 + Prefer java.nio.file.Files.newBufferedReader.<init>(Path, Charset) + + + + java/io/FileReader."<init>":(Ljava/lang/String;Ljava/nio/Charset;)V + 11 + Prefer java.nio.file.Files.newBufferedReader.<init>(Paths.get(String), Charset) + + java/io/FileWriter."<init>":(Ljava/io/File;)V 11