diff --git a/api/src/main/java/ai/djl/training/Trainer.java b/api/src/main/java/ai/djl/training/Trainer.java index 8358c02382e..eab6ba07f2a 100644 --- a/api/src/main/java/ai/djl/training/Trainer.java +++ b/api/src/main/java/ai/djl/training/Trainer.java @@ -281,7 +281,7 @@ public List getEvaluators() { * * @param listenerConsumer a consumer that executes the method */ - public void notifyListeners(Consumer listenerConsumer) { + public final void notifyListeners(Consumer listenerConsumer) { listeners.forEach(listenerConsumer); } diff --git a/api/src/test/java/ai/djl/nn/BlockFactoryTest.java b/api/src/test/java/ai/djl/nn/BlockFactoryTest.java index e67fe745750..230631486f5 100644 --- a/api/src/test/java/ai/djl/nn/BlockFactoryTest.java +++ b/api/src/test/java/ai/djl/nn/BlockFactoryTest.java @@ -20,6 +20,7 @@ import java.nio.file.Path; import java.nio.file.Paths; +@SuppressWarnings("PMD.TestClassWithoutTestCases") public class BlockFactoryTest { @Test diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 9fdf29027ec..5c027480167 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip diff --git a/integration/src/main/java/ai/djl/integration/IntegrationTest.java b/integration/src/main/java/ai/djl/integration/IntegrationTest.java index 41a7cafaf42..a55cec9a22c 100644 --- a/integration/src/main/java/ai/djl/integration/IntegrationTest.java +++ b/integration/src/main/java/ai/djl/integration/IntegrationTest.java @@ -51,6 +51,7 @@ import java.util.jar.JarFile; import java.util.stream.Collectors; +@SuppressWarnings("PMD.TestClassWithoutTestCases") public class IntegrationTest { private static final Logger logger = LoggerFactory.getLogger(IntegrationTest.class); diff --git a/integration/src/main/java/ai/djl/integration/tests/inference/StreamingTest.java b/integration/src/main/java/ai/djl/integration/tests/inference/StreamingTest.java index c6561852a97..8ca827f90e1 100644 --- a/integration/src/main/java/ai/djl/integration/tests/inference/StreamingTest.java +++ b/integration/src/main/java/ai/djl/integration/tests/inference/StreamingTest.java @@ -35,6 +35,7 @@ import java.util.List; import java.util.stream.Stream; +@SuppressWarnings("PMD.TestClassWithoutTestCases") public class StreamingTest { @Test diff --git a/integration/src/main/java/ai/djl/integration/tests/nn/BlockFactoryTest.java b/integration/src/main/java/ai/djl/integration/tests/nn/BlockFactoryTest.java index d7ce5b163b5..9c356e08c35 100644 --- a/integration/src/main/java/ai/djl/integration/tests/nn/BlockFactoryTest.java +++ b/integration/src/main/java/ai/djl/integration/tests/nn/BlockFactoryTest.java @@ -99,6 +99,7 @@ private Path prepareModel(Path savedDir) throws IOException, ModelException { return zipPath; } + @SuppressWarnings("PMD.TestClassWithoutTestCases") public static class TestBlockFactory implements BlockFactory { private static final long serialVersionUID = 1234567L; diff --git a/integration/src/main/java/ai/djl/integration/tests/nn/ScaledDotProductAttentionBlockTest.java b/integration/src/main/java/ai/djl/integration/tests/nn/ScaledDotProductAttentionBlockTest.java index 71c73151908..122a2029f36 100644 --- a/integration/src/main/java/ai/djl/integration/tests/nn/ScaledDotProductAttentionBlockTest.java +++ b/integration/src/main/java/ai/djl/integration/tests/nn/ScaledDotProductAttentionBlockTest.java @@ -30,6 +30,7 @@ import org.testng.Assert; import org.testng.annotations.Test; +@SuppressWarnings("PMD.TestClassWithoutTestCases") public class ScaledDotProductAttentionBlockTest { private double[] keySequenceInitialization = { diff --git a/integration/src/main/java/ai/djl/integration/util/TestUtils.java b/integration/src/main/java/ai/djl/integration/util/TestUtils.java index 4331cdc0ec4..7af2fe991c1 100644 --- a/integration/src/main/java/ai/djl/integration/util/TestUtils.java +++ b/integration/src/main/java/ai/djl/integration/util/TestUtils.java @@ -20,6 +20,7 @@ import java.util.Arrays; +@SuppressWarnings("PMD.TestClassWithoutTestCases") public final class TestUtils { private static String engineName = Engine.getDefaultEngineName(); diff --git a/testing/src/main/java/ai/djl/testing/CoverageUtils.java b/testing/src/main/java/ai/djl/testing/CoverageUtils.java index 07213638bf8..42cdecb5fbd 100644 --- a/testing/src/main/java/ai/djl/testing/CoverageUtils.java +++ b/testing/src/main/java/ai/djl/testing/CoverageUtils.java @@ -39,7 +39,7 @@ import java.util.jar.JarFile; import java.util.stream.Collectors; -@SuppressWarnings("PMD.AvoidAccessibilityAlteration") +@SuppressWarnings({"PMD.AvoidAccessibilityAlteration", "PMD.TestClassWithoutTestCases"}) public final class CoverageUtils { private CoverageUtils() {} diff --git a/testing/src/main/java/ai/djl/testing/TestRequirements.java b/testing/src/main/java/ai/djl/testing/TestRequirements.java index 1d4da5f76bf..bf57d64bd7c 100644 --- a/testing/src/main/java/ai/djl/testing/TestRequirements.java +++ b/testing/src/main/java/ai/djl/testing/TestRequirements.java @@ -24,6 +24,7 @@ *

When the test requirements are not fulfilled, the test is skipped with a {@link * SkipException}. */ +@SuppressWarnings("PMD.TestClassWithoutTestCases") public final class TestRequirements { private TestRequirements() {} diff --git a/tools/conf/pmd.xml b/tools/conf/pmd.xml index 16642b65912..fa3370942e2 100644 --- a/tools/conf/pmd.xml +++ b/tools/conf/pmd.xml @@ -407,7 +407,6 @@ -