mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[build] Enable spotbugs (#3601)
Benign spotbugs warnings were suppressed, and all others were fixed. Bug descriptions are documented here: https://spotbugs.readthedocs.io/en/stable/bugDescriptions.html Co-authored-by: Austin Shalit <austinshalit@gmail.com>
This commit is contained in:
@@ -95,7 +95,7 @@ class PreferencesTest {
|
||||
() -> assertEquals(0.2, m_prefs.getDouble("checkedValueDouble", 0), 1e-6),
|
||||
() -> assertEquals("Hello. How are you?", m_prefs.getString("checkedValueString", "")),
|
||||
() -> assertEquals(2, m_prefs.getInt("checkedValueInt", 0)),
|
||||
() -> assertEquals(3.14, m_prefs.getFloat("checkedValueFloat", 0), 1e-6),
|
||||
() -> assertEquals(3.4, m_prefs.getFloat("checkedValueFloat", 0), 1e-6),
|
||||
() -> assertFalse(m_prefs.getBoolean("checkedValueBoolean", true)));
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.parallel.ResourceLock;
|
||||
|
||||
class TimedRobotTest {
|
||||
class MockRobot extends TimedRobot {
|
||||
static class MockRobot extends TimedRobot {
|
||||
public final AtomicInteger m_robotInitCount = new AtomicInteger(0);
|
||||
public final AtomicInteger m_simulationInitCount = new AtomicInteger(0);
|
||||
public final AtomicInteger m_disabledInitCount = new AtomicInteger(0);
|
||||
|
||||
@@ -16,6 +16,6 @@ class CANStatusTest {
|
||||
void canStatusGetDoesntThrow() {
|
||||
HAL.initialize(500, 0);
|
||||
CANStatus status = new CANStatus();
|
||||
assertDoesNotThrow(() -> CANJNI.GetCANStatus(status));
|
||||
assertDoesNotThrow(() -> CANJNI.getCANStatus(status));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user