mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-27 02:01:42 +00:00
Upgrade maven deps to latest versions and fix new linter errors (#3772)
This also makes the Gradle build work with JDK 17. The extra JVM args in gradle.properties works around a bug with spotless and JDK 17: https://github.com/diffplug/spotless/issues/834 PMD.CloseResource was ignored because it's almost always a false positive, and there are many of them.
This commit is contained in:
@@ -34,19 +34,20 @@ public abstract class UtilityClassTest<T> {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void singleConstructorTest() {
|
||||
void singleConstructorTest() {
|
||||
assertEquals(1, m_clazz.getDeclaredConstructors().length, "More than one constructor defined");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void constructorPrivateTest() {
|
||||
void constructorPrivateTest() {
|
||||
Constructor<?> constructor = m_clazz.getDeclaredConstructors()[0];
|
||||
|
||||
assertFalse(constructor.canAccess(null), "Constructor is not private");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void constructorReflectionTest() {
|
||||
@SuppressWarnings("PMD.AvoidAccessibilityAlteration")
|
||||
void constructorReflectionTest() {
|
||||
Constructor<?> constructor = m_clazz.getDeclaredConstructors()[0];
|
||||
constructor.setAccessible(true);
|
||||
assertThrows(InvocationTargetException.class, constructor::newInstance);
|
||||
|
||||
Reference in New Issue
Block a user