From 7187e005d4501248b9e6c7ea861cd5f792915f9c Mon Sep 17 00:00:00 2001 From: Austin Shalit Date: Sun, 7 May 2017 02:22:16 -0400 Subject: [PATCH] Add Checkstyle WhitespaceAfter check (#466) --- styleguide/checkstyle.xml | 2 ++ .../src/athena/java/edu/wpi/first/wpilibj/DigitalInput.java | 2 +- .../src/athena/java/edu/wpi/first/wpilibj/DigitalOutput.java | 2 +- .../src/athena/java/edu/wpi/first/wpilibj/DriverStation.java | 2 +- wpilibj/src/athena/java/edu/wpi/first/wpilibj/Relay.java | 2 +- wpilibj/src/athena/java/edu/wpi/first/wpilibj/RobotBase.java | 2 +- .../wpi/first/wpilibj/command/CommandSequentialGroupTest.java | 4 ++-- .../java/edu/wpi/first/wpilibj/BuiltInAccelerometerTest.java | 2 +- 8 files changed, 10 insertions(+), 8 deletions(-) diff --git a/styleguide/checkstyle.xml b/styleguide/checkstyle.xml index bfafc17578..584f8c8a8a 100644 --- a/styleguide/checkstyle.xml +++ b/styleguide/checkstyle.xml @@ -78,6 +78,7 @@ + @@ -168,6 +169,7 @@ + diff --git a/wpilibj/src/athena/java/edu/wpi/first/wpilibj/DigitalInput.java b/wpilibj/src/athena/java/edu/wpi/first/wpilibj/DigitalInput.java index 3689077c3b..a601895b6b 100644 --- a/wpilibj/src/athena/java/edu/wpi/first/wpilibj/DigitalInput.java +++ b/wpilibj/src/athena/java/edu/wpi/first/wpilibj/DigitalInput.java @@ -33,7 +33,7 @@ public class DigitalInput extends DigitalSource implements LiveWindowSendable { checkDigitalChannel(channel); m_channel = channel; - m_handle = DIOJNI.initializeDIOPort(DIOJNI.getPort((byte)channel), true); + m_handle = DIOJNI.initializeDIOPort(DIOJNI.getPort((byte) channel), true); LiveWindow.addSensor("DigitalInput", channel, this); HAL.report(tResourceType.kResourceType_DigitalInput, channel); diff --git a/wpilibj/src/athena/java/edu/wpi/first/wpilibj/DigitalOutput.java b/wpilibj/src/athena/java/edu/wpi/first/wpilibj/DigitalOutput.java index 80937e280a..2fab4a7971 100644 --- a/wpilibj/src/athena/java/edu/wpi/first/wpilibj/DigitalOutput.java +++ b/wpilibj/src/athena/java/edu/wpi/first/wpilibj/DigitalOutput.java @@ -37,7 +37,7 @@ public class DigitalOutput extends DigitalSource implements LiveWindowSendable { checkDigitalChannel(channel); m_channel = channel; - m_handle = DIOJNI.initializeDIOPort(DIOJNI.getPort((byte)channel), false); + m_handle = DIOJNI.initializeDIOPort(DIOJNI.getPort((byte) channel), false); HAL.report(tResourceType.kResourceType_DigitalOutput, channel); } diff --git a/wpilibj/src/athena/java/edu/wpi/first/wpilibj/DriverStation.java b/wpilibj/src/athena/java/edu/wpi/first/wpilibj/DriverStation.java index 7a806827a6..6fcef6c7e7 100644 --- a/wpilibj/src/athena/java/edu/wpi/first/wpilibj/DriverStation.java +++ b/wpilibj/src/athena/java/edu/wpi/first/wpilibj/DriverStation.java @@ -649,7 +649,7 @@ public class DriverStation implements RobotState.Interface { */ public boolean waitForData(double timeout) { long startTime = Utility.getFPGATime(); - long timeoutMicros = (long)(timeout * 1000000); + long timeoutMicros = (long) (timeout * 1000000); m_dataMutex.lock(); try { try { diff --git a/wpilibj/src/athena/java/edu/wpi/first/wpilibj/Relay.java b/wpilibj/src/athena/java/edu/wpi/first/wpilibj/Relay.java index 7076148f45..ae11fa21f8 100644 --- a/wpilibj/src/athena/java/edu/wpi/first/wpilibj/Relay.java +++ b/wpilibj/src/athena/java/edu/wpi/first/wpilibj/Relay.java @@ -86,7 +86,7 @@ public class Relay extends SensorBase implements MotorSafety, LiveWindowSendable private void initRelay() { SensorBase.checkRelayChannel(m_channel); - int portHandle = RelayJNI.getPort((byte)m_channel); + int portHandle = RelayJNI.getPort((byte) m_channel); if (m_direction == Direction.kBoth || m_direction == Direction.kForward) { m_forwardHandle = RelayJNI.initializeRelayPort(portHandle, true); HAL.report(tResourceType.kResourceType_Relay, m_channel); diff --git a/wpilibj/src/athena/java/edu/wpi/first/wpilibj/RobotBase.java b/wpilibj/src/athena/java/edu/wpi/first/wpilibj/RobotBase.java index 6461909c36..ed92d19d0f 100644 --- a/wpilibj/src/athena/java/edu/wpi/first/wpilibj/RobotBase.java +++ b/wpilibj/src/athena/java/edu/wpi/first/wpilibj/RobotBase.java @@ -61,7 +61,7 @@ public abstract class RobotBase { NetworkTable.setNetworkIdentity("Robot"); NetworkTable.setPersistentFilename("/home/lvuser/networktables.ini"); - NetworkTable.setServerMode();// must be before b + NetworkTable.setServerMode(); // must be before b m_ds = DriverStation.getInstance(); NetworkTable.getTable(""); // forces network tables to initialize NetworkTable.getTable("LiveWindow").getSubTable("~STATUS~").putBoolean("LW Enabled", false); diff --git a/wpilibj/src/test/java/edu/wpi/first/wpilibj/command/CommandSequentialGroupTest.java b/wpilibj/src/test/java/edu/wpi/first/wpilibj/command/CommandSequentialGroupTest.java index 41dca83a67..82abc3ab0e 100644 --- a/wpilibj/src/test/java/edu/wpi/first/wpilibj/command/CommandSequentialGroupTest.java +++ b/wpilibj/src/test/java/edu/wpi/first/wpilibj/command/CommandSequentialGroupTest.java @@ -68,7 +68,7 @@ public class CommandSequentialGroupTest extends AbstractCommandTest { assertCommandState(command1, 1, 1, 1, 0, 0); assertCommandState(command2, 0, 0, 0, 0, 0); assertCommandState(command3, 0, 0, 0, 0, 0); - sleep(1000);// command 1 timeout + sleep(1000); // command 1 timeout Scheduler.getInstance().run(); assertCommandState(command1, 1, 1, 1, 0, 1); assertCommandState(command2, 1, 1, 1, 0, 0); @@ -78,7 +78,7 @@ public class CommandSequentialGroupTest extends AbstractCommandTest { assertCommandState(command1, 1, 1, 1, 0, 1); assertCommandState(command2, 1, 2, 2, 0, 0); assertCommandState(command3, 0, 0, 0, 0, 0); - sleep(2000);// command 2 timeout + sleep(2000); // command 2 timeout Scheduler.getInstance().run(); assertCommandState(command1, 1, 1, 1, 0, 1); assertCommandState(command2, 1, 2, 2, 0, 1); diff --git a/wpilibjIntegrationTests/src/main/java/edu/wpi/first/wpilibj/BuiltInAccelerometerTest.java b/wpilibjIntegrationTests/src/main/java/edu/wpi/first/wpilibj/BuiltInAccelerometerTest.java index be8735402d..f057ff6c58 100644 --- a/wpilibjIntegrationTests/src/main/java/edu/wpi/first/wpilibj/BuiltInAccelerometerTest.java +++ b/wpilibjIntegrationTests/src/main/java/edu/wpi/first/wpilibj/BuiltInAccelerometerTest.java @@ -47,7 +47,7 @@ public class BuiltInAccelerometerTest extends AbstractComsSetup { @Parameters public static Collection generateData() { return Arrays.asList(new Accelerometer.Range[][]{{Accelerometer.Range.k2G}, - {Accelerometer.Range.k4G}, {Accelerometer.Range.k8G},}); + {Accelerometer.Range.k4G}, {Accelerometer.Range.k8G}}); } @Override