Skip to content

Commit

Permalink
Add violation for FileWriter
Browse files Browse the repository at this point in the history
  • Loading branch information
mkarg committed Dec 12, 2024
1 parent 2fa608c commit 57f1b7c
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions modernizer-maven-plugin/src/main/resources/modernizer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1289,6 +1289,30 @@ violation names use the same format that javap emits.
<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>7</version>
<comment>Prefer java.nio.file.Files.newBufferedWriter.&lt;init&gt;(Path)</comment>
</violation>

<violation>
<name>java/io/FileWriter."&lt;init&gt;":(Ljava/io/File;Z)V</name>
<version>7</version>
<comment>Prefer java.nio.file.Files.newBufferedWriter.&lt;init&gt;(Path, java.nio.file.StandardOpenOption.CREATE, java.nio.file.StandardOpenOption.WRITE)</comment>
</violation>

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

<violation>
<name>java/io/FileWriter."&lt;init&gt;":(Ljava/lang/String;Z)V</name>
<version>7</version>
<comment>Prefer java.nio.file.Files.newBufferedWriter.&lt;init&gt;(Paths.get(String), java.nio.file.StandardOpenOption.CREATE, java.nio.file.StandardOpenOption.WRITE)</comment>
</violation>

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

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

<violation>
<name>java/io/FileWriter."&lt;init&gt;":(Ljava/io/File;Ljava/nio/charset/Charset;Z)V</name>
<version>11</version>
<comment>Prefer java.nio.file.Files.newBufferedWriter.&lt;init&gt;(Path, Charset, java.nio.file.StandardOpenOption.CREATE, java.nio.file.StandardOpenOption.WRITE)</comment>
</violation>

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

<violation>
<name>java/io/FileWriter."&lt;init&gt;":(Ljava/lang/String;Ljava/nio/charset/Charset;Z)V</name>
<version>11</version>
<comment>Prefer java.nio.file.Files.newBufferedWriter.&lt;init&gt;(Paths.get(String), Charset, java.nio.file.StandardOpenOption.CREATE, java.nio.file.StandardOpenOption.WRITE)</comment>
</violation>

<violation>
<name>org/apache/commons/lang3/StringUtils.join:(Ljava/lang/Iterable;C)Ljava/lang/String;</name>
<version>8</version>
Expand Down

0 comments on commit 57f1b7c

Please sign in to comment.