[wpilibj] Suppress serialVersionUID warnings (#2618)

These are all classes (e.g. Exception classes) which will never be serialized.
This commit is contained in:
Peter Johnson
2020-07-26 17:06:17 -07:00
committed by GitHub
parent 0fe2319dfc
commit 5cf4c16f5b
12 changed files with 21 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2008-2018 FIRST. All Rights Reserved. */
/* Copyright (c) 2008-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -10,6 +10,7 @@ package edu.wpi.first.hal.util;
/**
* Exception indicating that the resource is already allocated.
*/
@SuppressWarnings("serial")
public class AllocationException extends RuntimeException {
/**
* Create a new AllocationException.

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2008-2018 FIRST. All Rights Reserved. */
/* Copyright (c) 2008-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -10,6 +10,7 @@ package edu.wpi.first.hal.util;
/**
* This exception represents an error in which a lower limit was set as higher than an upper limit.
*/
@SuppressWarnings("serial")
public class BoundaryException extends RuntimeException {
/**
* Create a new exception with the given message.

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2008-2018 FIRST. All Rights Reserved. */
/* Copyright (c) 2008-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -11,6 +11,7 @@ package edu.wpi.first.hal.util;
* Exception indicating that the resource is already allocated This is meant to be thrown by the
* resource class.
*/
@SuppressWarnings("serial")
public class CheckedAllocationException extends Exception {
/**
* Create a new CheckedAllocationException.

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2008-2018 FIRST. All Rights Reserved. */
/* Copyright (c) 2008-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -10,6 +10,7 @@ package edu.wpi.first.hal.util;
/**
* Exception indicating that an error has occured with a HAL Handle.
*/
@SuppressWarnings("serial")
public class HalHandleException extends RuntimeException {
/**
* Create a new HalHandleException.

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2008-2018 FIRST. All Rights Reserved. */
/* Copyright (c) 2008-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -10,6 +10,7 @@ package edu.wpi.first.hal.util;
/**
* Exception for bad status codes from the chip object.
*/
@SuppressWarnings("serial")
public final class UncleanStatusException extends IllegalStateException {
private final int m_statusCode;

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2008-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -18,6 +18,7 @@ package edu.wpi.first.wpilibj.command;
* it is put into multiple command groups, it is started from outside its command group, or it adds
* a new child. </p>
*/
@SuppressWarnings("serial")
public class IllegalUseOfCommandException extends RuntimeException {
/**
* Instantiates an {@link IllegalUseOfCommandException}.

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2008-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -23,6 +23,7 @@ public class AnalogTrigger implements Sendable, AutoCloseable {
/**
* Exceptions dealing with improper operation of the Analog trigger.
*/
@SuppressWarnings("serial")
public static class AnalogTriggerException extends RuntimeException {
/**
* Create a new exception with the given message.

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2008-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -44,6 +44,7 @@ public class AnalogTriggerOutput extends DigitalSource implements Sendable {
/**
* Exceptions dealing with improper operation of the Analog trigger output.
*/
@SuppressWarnings("serial")
public static class AnalogTriggerOutputException extends RuntimeException {
/**
* Create a new exception with the given message.

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2008-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -33,6 +33,7 @@ public class Relay extends MotorSafety implements Sendable, AutoCloseable {
* This class represents errors in trying to set relay values contradictory to the direction to
* which the relay is set.
*/
@SuppressWarnings("serial")
public static class InvalidValueException extends RuntimeException {
/**
* Create a new exception with the given message.

View File

@@ -62,6 +62,7 @@ public final class SplineParameterizer {
}
}
@SuppressWarnings("serial")
public static class MalformedSplineException extends RuntimeException {
/**
* Create a new exception with the given message.

View File

@@ -232,6 +232,7 @@ public final class TrajectoryGenerator {
}
// Work around type erasure signatures
@SuppressWarnings("serial")
public static class ControlVectorList extends ArrayList<Spline.ControlVector> {
public ControlVectorList(int initialCapacity) {
super(initialCapacity);

View File

@@ -309,6 +309,7 @@ public final class TrajectoryParameterizer {
}
}
@SuppressWarnings("serial")
public static class TrajectoryGenerationException extends RuntimeException {
public TrajectoryGenerationException(String message) {
super(message);