Skip to content

Commit

Permalink
Add violation for FileReader
Browse files Browse the repository at this point in the history
  • Loading branch information
mkarg committed Dec 12, 2024
1 parent 0e478c0 commit 1601b05
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions modernizer-maven-plugin/src/main/resources/modernizer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1265,6 +1265,18 @@ violation names use the same format that javap emits.
<comment>Prefer java.nio.file.Files.newOutputStream(java.nio.file.Path, java.nio.file.StandardOpenOption.CREATE, java.nio.file.StandardOpenOption.CREATE)</comment>
</violation>

<violation>
<name>java/io/FileReader."&lt;init&gt;":(Ljava/io/File;)V</name>
<version>7</version>
<comment>Prefer java.nio.file.Files.newBufferedReader.&lt;init&gt;(java.nio.file.Path)</comment>
</violation>

<violation>
<name>java/io/FileReader."&lt;init&gt;":(Ljava/lang/String;)V</name>
<version>7</version>
<comment>Prefer java.nio.file.Files.newBufferedReader.&lt;init&gt;(java.nio.file.Paths.get(String))</comment>
</violation>

<violation>
<name>java/io/FileReader."&lt;init&gt;":(Ljava/io/File;)V</name>
<version>11</version>
Expand All @@ -1277,6 +1289,18 @@ violation names use the same format that javap emits.
<comment>Prefer java.io.FileReader.&lt;init&gt;(String, Charset)</comment>
</violation>

<violation>
<name>java/io/FileReader."&lt;init&gt;":(Ljava/io/File;Ljava/nio/Charset;)V</name>
<version>11</version>
<comment>Prefer java.nio.file.Files.newBufferedReader.&lt;init&gt;(Path, Charset)</comment>
</violation>

<violation>
<name>java/io/FileReader."&lt;init&gt;":(Ljava/lang/String;Ljava/nio/Charset;)V</name>
<version>11</version>
<comment>Prefer java.nio.file.Files.newBufferedReader.&lt;init&gt;(Paths.get(String), Charset)</comment>
</violation>

<violation>
<name>java/io/FileWriter."&lt;init&gt;":(Ljava/io/File;)V</name>
<version>11</version>
Expand Down

0 comments on commit 1601b05

Please sign in to comment.