mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +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:
@@ -19,6 +19,12 @@ import org.junit.jupiter.api.DynamicTest;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.TestFactory;
|
||||
|
||||
// Declaring this class abstract prevents UtilityClassTest from running on itself and throwing the
|
||||
// following exception:
|
||||
//
|
||||
// org.junit.jupiter.api.extension.ParameterResolutionException: No ParameterResolver registered
|
||||
// for parameter [java.lang.Class<T> arg0] in constructor [protected
|
||||
// edu.wpi.first.wpilibj.UtilityClassTest(java.lang.Class<T>)].
|
||||
@SuppressWarnings("PMD.AbstractClassWithoutAbstractMethod")
|
||||
public abstract class UtilityClassTest<T> {
|
||||
private final Class<T> m_clazz;
|
||||
|
||||
Reference in New Issue
Block a user