mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-28 02:11:43 +00:00
Disable frivolous PMD warnings and enable PMD in ntcore (#3419)
Some valid warnings like throwing NullPointerException or using a for loop instead of System.arraycopy() were fixed. Abstract classes marked with PMD.AbstractClassWithoutAbstractMethod were made concrete because they already had protected constructors. Fixes #1697.
This commit is contained in:
@@ -41,7 +41,6 @@ class ConnectionListenerTest {
|
||||
}
|
||||
|
||||
/** Connect to the server. */
|
||||
@SuppressWarnings("PMD.AvoidUsingHardCodedIP")
|
||||
private void connect() {
|
||||
m_serverInst.startServer("connectionlistenertest.ini", "127.0.0.1", 10000);
|
||||
m_clientInst.startClient("127.0.0.1", 10000);
|
||||
@@ -109,7 +108,6 @@ class ConnectionListenerTest {
|
||||
|
||||
@ParameterizedTest
|
||||
@DisabledOnOs(OS.WINDOWS)
|
||||
@SuppressWarnings("PMD.AvoidUsingHardCodedIP")
|
||||
@ValueSource(strings = {"127.0.0.1", "127.0.0.1 ", " 127.0.0.1 "})
|
||||
void testThreaded(String address) {
|
||||
m_serverInst.startServer("connectionlistenertest.ini", address, 10000);
|
||||
|
||||
@@ -34,7 +34,6 @@ class EntryListenerTest {
|
||||
m_serverInst.close();
|
||||
}
|
||||
|
||||
@SuppressWarnings("PMD.AvoidUsingHardCodedIP")
|
||||
private void connect() {
|
||||
m_serverInst.startServer("connectionlistenertest.ini", "127.0.0.1", 10000);
|
||||
m_clientInst.startClient("127.0.0.1", 10000);
|
||||
|
||||
@@ -27,7 +27,6 @@ class LoggerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("PMD.AvoidUsingHardCodedIP")
|
||||
void addMessageTest() {
|
||||
List<LogMessage> msgs = new ArrayList<>();
|
||||
m_clientInst.addLogger(msgs::add, LogMessage.kInfo, 100);
|
||||
|
||||
Reference in New Issue
Block a user