add back violations.xml
This commit is contained in:
parent
88ab15c6c1
commit
9992b40548
2
pom.xml
2
pom.xml
@ -622,7 +622,7 @@
|
|||||||
<version>2.5.0</version>
|
<version>2.5.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<violationsFiles>
|
<violationsFiles>
|
||||||
<violationsFile>${project.parent.basedir}/.mvn/modernizer/violations.xml</violationsFile>
|
<violationsFile>${maven.multiModuleProjectDirectory}/src/violations.xml</violationsFile>
|
||||||
</violationsFiles>
|
</violationsFiles>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
63
src/violations.xml
Normal file
63
src/violations.xml
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<modernizer>
|
||||||
|
<violation>
|
||||||
|
<name>java/lang/Class.newInstance:()Ljava/lang/Object;</name>
|
||||||
|
<version>1.1</version>
|
||||||
|
<comment>Prefer Class.getConstructor().newInstance()</comment>
|
||||||
|
</violation>
|
||||||
|
|
||||||
|
<violation>
|
||||||
|
<name>java/lang/String."<init>":([B)V</name>
|
||||||
|
<version>1.1</version>
|
||||||
|
<comment>Prefer new String(byte[], Charset)</comment>
|
||||||
|
</violation>
|
||||||
|
|
||||||
|
<violation>
|
||||||
|
<name>java/lang/String.getBytes:()[B</name>
|
||||||
|
<version>1.1</version>
|
||||||
|
<comment>Prefer String.getBytes(Charset)</comment>
|
||||||
|
</violation>
|
||||||
|
|
||||||
|
<violation>
|
||||||
|
<!-- File.getPath() is the canonical way to convert File to its String representation suitable for passing to new File() -->
|
||||||
|
<name>java/io/File.toString:()Ljava/lang/String;</name>
|
||||||
|
<version>1.1</version>
|
||||||
|
<comment>Prefer File.getPath()</comment>
|
||||||
|
</violation>
|
||||||
|
|
||||||
|
<violation>
|
||||||
|
<name>org/testng/Assert.assertEquals:(Ljava/lang/Iterable;Ljava/lang/Iterable;)V</name>
|
||||||
|
<version>1.8</version>
|
||||||
|
<comment>Use io.trino.testing.assertions.Assert.assertEquals due to TestNG #543</comment>
|
||||||
|
</violation>
|
||||||
|
|
||||||
|
<violation>
|
||||||
|
<name>org/testng/Assert.assertEquals:(Ljava/lang/Iterable;Ljava/lang/Iterable;Ljava/lang/String;)V</name>
|
||||||
|
<version>1.8</version>
|
||||||
|
<comment>Use io.trino.testing.assertions.Assert.assertEquals due to TestNG #543</comment>
|
||||||
|
</violation>
|
||||||
|
|
||||||
|
<violation>
|
||||||
|
<name>org/testng/Assert.assertThrows:(Lorg/testng/Assert$ThrowingRunnable;)V</name>
|
||||||
|
<version>1.8</version>
|
||||||
|
<comment>Use AssertJ's assertThatThrownBy, see https://github.com/trinodb/trino/issues/5320 for rationale</comment>
|
||||||
|
</violation>
|
||||||
|
|
||||||
|
<violation>
|
||||||
|
<name>org/testng/Assert.assertThrows:(Ljava/lang/Class;Lorg/testng/Assert$ThrowingRunnable;)V</name>
|
||||||
|
<version>1.8</version>
|
||||||
|
<comment>Use AssertJ's assertThatThrownBy, see https://github.com/trinodb/trino/issues/5320 for rationale</comment>
|
||||||
|
</violation>
|
||||||
|
|
||||||
|
<violation>
|
||||||
|
<name>java/util/TimeZone.getTimeZone:(Ljava/lang/String;)Ljava/util/TimeZone;</name>
|
||||||
|
<version>1.8</version>
|
||||||
|
<comment>Avoid TimeZone.getTimeZone as it returns GMT for a zone not supported by the JVM. Use TimeZone.getTimeZone(ZoneId.of(..)) instead, or TimeZone.getTimeZone(..., false).</comment>
|
||||||
|
</violation>
|
||||||
|
|
||||||
|
<violation>
|
||||||
|
<name>org/joda/time/DateTimeZone.toTimeZone:()Ljava/util/TimeZone;</name>
|
||||||
|
<version>1.8</version>
|
||||||
|
<comment>Avoid DateTimeZone.toTimeZone as it returns GMT for a zone not supported by the JVM. Use TimeZone.getTimeZone(ZoneId.of(dtz.getId())) instead.</comment>
|
||||||
|
</violation>
|
||||||
|
</modernizer>
|
Loading…
x
Reference in New Issue
Block a user