Clean up Java warning suppressions (#4433)

Checkstyle naming conventions were changed to allow most of what's in
wpimath. Naming rules were disabled completely in wpimath since almost
all suppressions are for math notation.
This commit is contained in:
Tyler Veness
2022-09-24 00:13:55 -07:00
committed by GitHub
parent 17f504f548
commit a791470de7
233 changed files with 282 additions and 881 deletions

View File

@@ -20,6 +20,5 @@ public interface Interpolatable<T> {
* @param t How far between the lower and upper bound we are. This should be bounded in [0, 1].
* @return The interpolated value.
*/
@SuppressWarnings("ParameterName")
T interpolate(T endValue, double t);
}

View File

@@ -101,7 +101,6 @@ public final class TimeInterpolatableBuffer<T> {
* @param timeSeconds The time at which to sample.
* @return The interpolated value at that timestamp or an empty Optional.
*/
@SuppressWarnings("UnnecessaryParentheses")
public Optional<T> getSample(double timeSeconds) {
if (m_pastSnapshots.isEmpty()) {
return Optional.empty();
@@ -131,7 +130,7 @@ public final class TimeInterpolatableBuffer<T> {
m_interpolatingFunc.interpolate(
bottomBound.getValue(),
topBound.getValue(),
((timeSeconds - bottomBound.getKey()) / (topBound.getKey() - bottomBound.getKey()))));
(timeSeconds - bottomBound.getKey()) / (topBound.getKey() - bottomBound.getKey())));
}
}
@@ -145,7 +144,6 @@ public final class TimeInterpolatableBuffer<T> {
* @param t How far between the lower and upper bound we are. This should be bounded in [0, 1].
* @return The interpolated value.
*/
@SuppressWarnings("ParameterName")
T interpolate(T start, T end, double t);
}
}