[build] Upgrade to spotbugs Gradle plugin 5.0.8 (#4310)

This fixes a SecurityManager deprecation warning generated by spotbugs.
This commit is contained in:
Tyler Veness
2022-06-14 20:26:53 -07:00
committed by GitHub
parent fd884581e4
commit aebc272449
7 changed files with 21 additions and 8 deletions

View File

@@ -23,7 +23,7 @@ plugins {
id 'net.ltgt.errorprone' version '2.0.2' apply false
id 'com.github.johnrengelman.shadow' version '7.1.2' apply false
id 'com.diffplug.spotless' version '6.4.2' apply false
id 'com.github.spotbugs' version '5.0.6' apply false
id 'com.github.spotbugs' version '5.0.8' apply false
}
wpilibVersioning.buildServerMode = project.hasProperty('buildServer')

View File

@@ -19,6 +19,9 @@
<Match>
<Bug pattern="EI_EXPOSE_REP2" />
</Match>
<Match>
<Bug pattern="FL_FLOATS_AS_LOOP_COUNTERS" />
</Match>
<Match>
<Bug pattern="IS2_INCONSISTENT_SYNC" />
<Source name="MechanismLigament2d.java" />
@@ -69,9 +72,19 @@
<Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE" />
<Source name="RuntimeLoader.java" />
</Match>
<Match>
<Bug pattern="SSD_DO_NOT_USE_INSTANCE_LOCK_ON_SHARED_STATIC_DATA" />
<Source name="Ultrasonic.java" />
</Match>
<Match>
<Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD" />
</Match>
<Match>
<Bug pattern="THROWS_METHOD_THROWS_CLAUSE_THROWABLE" />
</Match>
<Match>
<Bug pattern="THROWS_METHOD_THROWS_RUNTIMEEXCEPTION" />
</Match>
<Match>
<Bug pattern="UC_USELESS_VOID_METHOD" />
<Class name="edu.wpi.first.wpilibj.templates.romitimed.Robot" />

View File

@@ -95,7 +95,7 @@ public class ExternalDirectionCounter implements Sendable, AutoCloseable {
}
@Override
public void close() throws Exception {
public void close() {
SendableRegistry.remove(this);
CounterJNI.freeCounter(m_handle);
CounterJNI.suppressUnused(m_countSource);

View File

@@ -52,7 +52,7 @@ public class Tachometer implements Sendable, AutoCloseable {
}
@Override
public void close() throws Exception {
public void close() {
SendableRegistry.remove(this);
CounterJNI.freeCounter(m_handle);
CounterJNI.suppressUnused(m_source);

View File

@@ -66,7 +66,7 @@ public class UpDownCounter implements Sendable, AutoCloseable {
}
@Override
public void close() throws Exception {
public void close() {
SendableRegistry.remove(this);
CounterJNI.freeCounter(m_handle);
CounterJNI.suppressUnused(m_upSource);

View File

@@ -52,7 +52,7 @@ public abstract class AbstractInterruptTest extends AbstractComsSetup {
abstract void setInterruptLow();
@Test(timeout = 1000)
public void testSingleInterruptsTriggering() throws Exception {
public void testSingleInterruptsTriggering() {
// Given
// final InterruptCounter counter = new InterruptCounter();
// TestInterruptHandlerFunction function = new

View File

@@ -70,7 +70,7 @@ public class PCMTest extends AbstractComsSetup {
/** Test if the compressor turns on and off when the pressure switch is toggled. */
@Test
public void testPressureSwitch() throws Exception {
public void testPressureSwitch() {
final double range = 0.5;
reset();
pcm.enableCompressorDigital();
@@ -96,7 +96,7 @@ public class PCMTest extends AbstractComsSetup {
/** Test if the correct solenoids turn on and off when they should. */
@Test
public void testSolenoid() throws Exception {
public void testSolenoid() {
reset();
Solenoid solenoid1 = new Solenoid(PneumaticsModuleType.CTREPCM, 0);
@@ -174,7 +174,7 @@ public class PCMTest extends AbstractComsSetup {
/** Test if the correct solenoids turn on and off when they should. */
@Test
public void testOneShot() throws Exception {
public void testOneShot() {
reset();
Solenoid solenoid1 = new Solenoid(PneumaticsModuleType.CTREPCM, 0);