mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
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:
@@ -150,7 +150,7 @@ public final class RuntimeDetector {
|
||||
* @return if architecture is aarch64
|
||||
*/
|
||||
public static boolean isAarch64() {
|
||||
return System.getProperty("os.arch").equals("aarch64");
|
||||
return "aarch64".equals(System.getProperty("os.arch"));
|
||||
}
|
||||
|
||||
public static boolean isLinux() {
|
||||
|
||||
@@ -140,12 +140,12 @@ public final class RuntimeLoader<T> {
|
||||
} catch (UnsatisfiedLinkError ule) {
|
||||
// Then load the hash from the input file
|
||||
String resname = RuntimeDetector.getLibraryResource(m_libraryName);
|
||||
String hash = null;
|
||||
String hash;
|
||||
try (InputStream is = m_loadClass.getResourceAsStream(resname)) {
|
||||
if (is == null) {
|
||||
throw new IOException(getLoadErrorMessage(ule));
|
||||
}
|
||||
MessageDigest md = null;
|
||||
MessageDigest md;
|
||||
try {
|
||||
md = MessageDigest.getInstance("MD5");
|
||||
} catch (NoSuchAlgorithmException nsae) {
|
||||
|
||||
@@ -462,7 +462,7 @@ public class SendableRegistry {
|
||||
* @param dataHandle data handle to get data object passed to callback
|
||||
* @param callback function to call for each object
|
||||
*/
|
||||
@SuppressWarnings("PMD.AvoidCatchingThrowable")
|
||||
@SuppressWarnings({"PMD.AvoidCatchingThrowable", "PMD.AvoidReassigningCatchVariables"})
|
||||
public static synchronized void foreachLiveWindow(
|
||||
int dataHandle, Consumer<CallbackData> callback) {
|
||||
CallbackData cbdata = new CallbackData();
|
||||
|
||||
Reference in New Issue
Block a user