Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions core/trino-main/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -485,17 +485,6 @@
</dependency>
</dependencies>
</plugin>

<plugin>
<groupId>org.gaul</groupId>
<artifactId>modernizer-maven-plugin</artifactId>
<configuration>
<ignoreClassNamePatterns>
<!-- we require certain org.testng.Assert methods be called via our Assert class, so that class needs to be allowed to call them -->
<ignoreClassNamePattern>io/trino/testing/assertions/Assert</ignoreClassNamePattern>
</ignoreClassNamePatterns>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
package io.trino.testing.assertions;

import io.airlift.units.Duration;
import org.gaul.modernizer_maven_annotations.SuppressModernizer;

import static java.util.concurrent.TimeUnit.MILLISECONDS;
import static java.util.concurrent.TimeUnit.SECONDS;
Expand All @@ -34,11 +35,13 @@ public class Assert
{
private Assert() {}

@SuppressModernizer // Assert.assertEquals(Iterable, Iterable) is forbidden, advising to use this class as a safety-adding wrapper.
public static void assertEquals(Iterable<?> actual, Iterable<?> expected)
{
assertEquals(actual, expected, null);
}

@SuppressModernizer // Assert.assertEquals(Iterable, Iterable, String) is forbidden, advising to use this class as a safety-adding wrapper.
public static void assertEquals(Iterable<?> actual, Iterable<?> expected, String message)
{
try {
Expand Down
20 changes: 5 additions & 15 deletions plugin/trino-password-authenticators/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@
<artifactId>validation-api</artifactId>
</dependency>

<dependency>
<groupId>org.gaul</groupId>
<artifactId>modernizer-maven-annotations</artifactId>
</dependency>

<!-- Trino SPI -->
<dependency>
<groupId>io.trino</groupId>
Expand Down Expand Up @@ -123,19 +128,4 @@
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.gaul</groupId>
<artifactId>modernizer-maven-plugin</artifactId>
<configuration>
<ignoreClassNamePatterns>
<!-- To allow usage of java.util.Hashtable -->
<ignoreClassNamePattern>io/trino/plugin/password/jndi/JndiUtils</ignoreClassNamePattern>
</ignoreClassNamePatterns>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
*/
package io.trino.plugin.password.jndi;

import org.gaul.modernizer_maven_annotations.SuppressModernizer;

import javax.naming.NamingException;
import javax.naming.directory.DirContext;
import javax.naming.directory.InitialDirContext;
Expand All @@ -27,6 +29,12 @@ private JndiUtils() {}
public static DirContext createDirContext(Map<String, String> environment)
throws NamingException
{
return new InitialDirContext(new Hashtable<>(environment));
return new InitialDirContext(createHashtable(environment));
}

@SuppressModernizer
private static Hashtable<String, String> createHashtable(Map<String, String> map)
{
return new Hashtable<>(map);
}
}