Upgrade maven deps to latest versions and fix new linter errors (#3772)

This also makes the Gradle build work with JDK 17.

The extra JVM args in gradle.properties works around a bug with spotless
and JDK 17: https://github.com/diffplug/spotless/issues/834

PMD.CloseResource was ignored because it's almost always a false
positive, and there are many of them.
This commit is contained in:
Tyler Veness
2021-12-09 12:20:08 -08:00
committed by GitHub
parent 441f2ed9b0
commit 7269a170fb
100 changed files with 306 additions and 338 deletions

View File

@@ -196,8 +196,8 @@ public final class HAL extends JNIWrapper {
@SuppressWarnings("MissingJavadocMethod")
public static native boolean waitForDSDataTimeout(double timeout);
public static int kMaxJoystickAxes = 12;
public static int kMaxJoystickPOVs = 12;
public static final int kMaxJoystickAxes = 12;
public static final int kMaxJoystickPOVs = 12;
public static native short getJoystickAxes(byte joystickNum, float[] axesArray);

View File

@@ -14,10 +14,17 @@ public final class CANExceptionFactory {
static final int ERR_CANSessionMux_NotAllowed = -44088;
static final int ERR_CANSessionMux_NotInitialized = -44089;
@SuppressWarnings("MissingJavadocMethod")
public static void checkStatus(int status, int messageID)
throws CANInvalidBufferException, CANMessageNotAllowedException, CANNotInitializedException,
UncleanStatusException {
/**
* Checks the status of a CAN message with the given message ID.
*
* @param status The CAN status.
* @param messageID The CAN message ID.
* @throws CANInvalidBufferException if the buffer is invalid.
* @throws CANMessageNotAllowedException if the message isn't allowed.
* @throws CANNotInitializedException if the CAN bus isn't initialized.
* @throws UncleanStatusException if the status code passed in reports an error.
*/
public static void checkStatus(int status, int messageID) {
switch (status) {
case NIRioStatus.kRioStatusSuccess:
// Everything is ok... don't throw.