This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-net.git


The following commit(s) were added to refs/heads/master by this push:
     new 7ffbb8f5 Ignore some PMD complaints in test code
7ffbb8f5 is described below

commit 7ffbb8f563b412f8df80f8aed10b0ef6bca03472
Author: Sebb <[email protected]>
AuthorDate: Thu Feb 26 12:57:52 2026 +0000

    Ignore some PMD complaints in test code
---
 .../org/apache/commons/net/examples/telnet/TelnetClientExample.java   | 2 +-
 .../java/org/apache/commons/net/daytime/DaytimeTCPClientTest.java     | 2 +-
 src/test/java/org/apache/commons/net/ftp/AbstractFtpsTest.java        | 4 ++--
 src/test/java/org/apache/commons/net/ntp/TestNtpClient.java           | 2 +-
 src/test/java/org/apache/commons/net/tftp/TFTPTest.java               | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git 
a/src/main/java/org/apache/commons/net/examples/telnet/TelnetClientExample.java 
b/src/main/java/org/apache/commons/net/examples/telnet/TelnetClientExample.java
index 5566255f..02bdc694 100644
--- 
a/src/main/java/org/apache/commons/net/examples/telnet/TelnetClientExample.java
+++ 
b/src/main/java/org/apache/commons/net/examples/telnet/TelnetClientExample.java
@@ -41,7 +41,7 @@ import 
org.apache.commons.net.telnet.TerminalTypeOptionHandler;
  * see the result. Type OPT to see a report of the state of the first 25 
options.
  */
 public class TelnetClientExample implements Runnable, 
TelnetNotificationHandler {
-    private static TelnetClient tc;
+    private static TelnetClient tc; //NOPMD example code
 
     /**
      * Main for the TelnetClientExample.
diff --git 
a/src/test/java/org/apache/commons/net/daytime/DaytimeTCPClientTest.java 
b/src/test/java/org/apache/commons/net/daytime/DaytimeTCPClientTest.java
index 2c7d6309..e0cb192a 100644
--- a/src/test/java/org/apache/commons/net/daytime/DaytimeTCPClientTest.java
+++ b/src/test/java/org/apache/commons/net/daytime/DaytimeTCPClientTest.java
@@ -40,7 +40,7 @@ import org.junit.jupiter.params.provider.MethodSource;
 
 class DaytimeTCPClientTest {
 
-    private static MockDaytimeTCPServer mockDaytimeTCPServer;
+    private static MockDaytimeTCPServer mockDaytimeTCPServer; //NOPMD
 
     @AfterAll
     public static void afterAll() throws IOException {
diff --git a/src/test/java/org/apache/commons/net/ftp/AbstractFtpsTest.java 
b/src/test/java/org/apache/commons/net/ftp/AbstractFtpsTest.java
index 2816528e..896cc31a 100644
--- a/src/test/java/org/apache/commons/net/ftp/AbstractFtpsTest.java
+++ b/src/test/java/org/apache/commons/net/ftp/AbstractFtpsTest.java
@@ -57,8 +57,8 @@ import org.apache.ftpserver.usermanager.impl.BaseUser;
  */
 public abstract class AbstractFtpsTest {
 
-    private static int SocketPort;
-    private static FtpServer EmbeddedFtpServer;
+    private static int SocketPort; //NOPMD test code
+    private static FtpServer EmbeddedFtpServer; //NOPMD test code
     protected static final boolean IMPLICIT = false;
     protected static final long TEST_TIMEOUT = 10000; // individual test 
timeout
     private static final boolean TRACE_CALLS = 
Boolean.parseBoolean(System.getenv("TRACE_CALLS"));
diff --git a/src/test/java/org/apache/commons/net/ntp/TestNtpClient.java 
b/src/test/java/org/apache/commons/net/ntp/TestNtpClient.java
index ed061b37..fa22f2cd 100644
--- a/src/test/java/org/apache/commons/net/ntp/TestNtpClient.java
+++ b/src/test/java/org/apache/commons/net/ntp/TestNtpClient.java
@@ -36,7 +36,7 @@ import org.junit.jupiter.api.Test;
  */
 class TestNtpClient {
 
-    private static SimpleNTPServer server;
+    private static SimpleNTPServer server; //NOPMD test code
 
     @BeforeAll
     public static void oneTimeSetUp() throws IOException {
diff --git a/src/test/java/org/apache/commons/net/tftp/TFTPTest.java 
b/src/test/java/org/apache/commons/net/tftp/TFTPTest.java
index f73c22e9..ac6174f7 100644
--- a/src/test/java/org/apache/commons/net/tftp/TFTPTest.java
+++ b/src/test/java/org/apache/commons/net/tftp/TFTPTest.java
@@ -41,7 +41,7 @@ import org.junit.jupiter.api.Test;
  */
 class TFTPTest {
     private static final int SERVER_PORT = 6902;
-    private static TFTPServer tftpS;
+    private static TFTPServer tftpS; //NOPMD test code
     private static final File SERVER_DIR = FileUtils.getTempDirectory();
     private static final String FILE_PREFIX = "tftp-";
     private static final File[] FILES = new File[8];

Reply via email to