Skip to content

Commit

Permalink
[commands] Suppress this-escape warnings (wpilibsuite#6828)
Browse files Browse the repository at this point in the history
  • Loading branch information
calcmogul authored Jul 13, 2024
1 parent deb5f3d commit fc44737
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public class ConditionalCommand extends Command {
* @param onFalse the command to run if the condition is false
* @param condition the condition to determine which command to run
*/
@SuppressWarnings("this-escape")
public ConditionalCommand(Command onTrue, Command onFalse, BooleanSupplier condition) {
m_onTrue = requireNonNullParam(onTrue, "onTrue", "ConditionalCommand");
m_onFalse = requireNonNullParam(onFalse, "onFalse", "ConditionalCommand");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public class PIDCommand extends Command {
* @param useOutput the controller's output
* @param requirements the subsystems required by this command
*/
@SuppressWarnings("this-escape")
public PIDCommand(
PIDController controller,
DoubleSupplier measurementSource,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public class ParallelCommandGroup extends Command {
*
* @param commands the commands to include in this composition.
*/
@SuppressWarnings("this-escape")
public ParallelCommandGroup(Command... commands) {
addCommands(commands);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public class ParallelDeadlineGroup extends Command {
* @param otherCommands the other commands to be executed
* @throws IllegalArgumentException if the deadline command is also in the otherCommands argument
*/
@SuppressWarnings("this-escape")
public ParallelDeadlineGroup(Command deadline, Command... otherCommands) {
setDeadline(deadline);
addCommands(otherCommands);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public class ParallelRaceGroup extends Command {
*
* @param commands the commands to include in this composition.
*/
@SuppressWarnings("this-escape")
public ParallelRaceGroup(Command... commands) {
addCommands(commands);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public class ProfiledPIDCommand extends Command {
* @param useOutput the controller's output
* @param requirements the subsystems required by this command
*/
@SuppressWarnings("this-escape")
public ProfiledPIDCommand(
ProfiledPIDController controller,
DoubleSupplier measurementSource,
Expand Down Expand Up @@ -70,6 +71,7 @@ public ProfiledPIDCommand(
* @param useOutput the controller's output
* @param requirements the subsystems required by this command
*/
@SuppressWarnings("this-escape")
public ProfiledPIDCommand(
ProfiledPIDController controller,
DoubleSupplier measurementSource,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public class SelectCommand<K> extends Command {
* @param commands the map of commands to choose from
* @param selector the selector to determine which command to run
*/
@SuppressWarnings("this-escape")
public SelectCommand(Map<K, Command> commands, Supplier<? extends K> selector) {
m_commands = requireNonNullParam(commands, "commands", "SelectCommand");
m_selector = requireNonNullParam(selector, "selector", "SelectCommand");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public class SequentialCommandGroup extends Command {
*
* @param commands the commands to include in this composition.
*/
@SuppressWarnings("this-escape")
public SequentialCommandGroup(Command... commands) {
addCommands(commands);
}
Expand Down

0 comments on commit fc44737

Please sign in to comment.