mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
Update and enable PMD 6.3.0 (#1107)
This commit is contained in:
committed by
Peter Johnson
parent
8eafe7f325
commit
e548a5f705
@@ -8,8 +8,8 @@
|
||||
package edu.wpi.first.wpilibj;
|
||||
|
||||
public class MockSpeedController implements SpeedController {
|
||||
private double m_speed = 0.0;
|
||||
private boolean m_isInverted = false;
|
||||
private double m_speed;
|
||||
private boolean m_isInverted;
|
||||
|
||||
@Override
|
||||
public void set(double speed) {
|
||||
|
||||
@@ -28,6 +28,7 @@ public abstract class AbstractCommandTest {
|
||||
public class ASubsystem extends Subsystem {
|
||||
Command m_command;
|
||||
|
||||
@Override
|
||||
protected void initDefaultCommand() {
|
||||
if (m_command != null) {
|
||||
setDefaultCommand(m_command);
|
||||
|
||||
@@ -12,12 +12,12 @@ package edu.wpi.first.wpilibj.command;
|
||||
* called.
|
||||
*/
|
||||
public class MockCommand extends Command {
|
||||
private int m_initializeCount = 0;
|
||||
private int m_executeCount = 0;
|
||||
private int m_isFinishedCount = 0;
|
||||
private boolean m_hasFinished = false;
|
||||
private int m_endCount = 0;
|
||||
private int m_interruptedCount = 0;
|
||||
private int m_initializeCount;
|
||||
private int m_executeCount;
|
||||
private int m_isFinishedCount;
|
||||
private boolean m_hasFinished;
|
||||
private int m_endCount;
|
||||
private int m_interruptedCount;
|
||||
|
||||
public MockCommand(Subsystem subsys) {
|
||||
super();
|
||||
@@ -28,23 +28,28 @@ public class MockCommand extends Command {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initialize() {
|
||||
++m_initializeCount;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void execute() {
|
||||
++m_executeCount;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isFinished() {
|
||||
++m_isFinishedCount;
|
||||
return isHasFinished();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void end() {
|
||||
++m_endCount;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void interrupted() {
|
||||
++m_interruptedCount;
|
||||
}
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
package edu.wpi.first.wpilibj.command;
|
||||
|
||||
public class MockConditionalCommand extends ConditionalCommand {
|
||||
private boolean m_condition = false;
|
||||
private int m_initializeCount = 0;
|
||||
private int m_executeCount = 0;
|
||||
private int m_isFinishedCount = 0;
|
||||
private int m_endCount = 0;
|
||||
private int m_interruptedCount = 0;
|
||||
private boolean m_condition;
|
||||
private int m_initializeCount;
|
||||
private int m_executeCount;
|
||||
private int m_isFinishedCount;
|
||||
private int m_endCount;
|
||||
private int m_interruptedCount;
|
||||
|
||||
public MockConditionalCommand(MockCommand onTrue, MockCommand onFalse) {
|
||||
super(onTrue, onFalse);
|
||||
@@ -28,23 +28,28 @@ public class MockConditionalCommand extends ConditionalCommand {
|
||||
this.m_condition = condition;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initialize() {
|
||||
++m_initializeCount;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void execute() {
|
||||
++m_executeCount;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isFinished() {
|
||||
++m_isFinishedCount;
|
||||
return super.isFinished();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void end() {
|
||||
++m_endCount;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void interrupted() {
|
||||
++m_interruptedCount;
|
||||
}
|
||||
|
||||
@@ -11,5 +11,6 @@ package edu.wpi.first.wpilibj.command;
|
||||
* A class to simulate a simple subsystem.
|
||||
*/
|
||||
public class MockSubsystem extends Subsystem {
|
||||
@Override
|
||||
protected void initDefaultCommand() {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user