diff --git a/apriltag/src/main/java/edu/wpi/first/apriltag/AprilTagFieldLayout.java b/apriltag/src/main/java/edu/wpi/first/apriltag/AprilTagFieldLayout.java index c670cf1ae1..3a85ded7c0 100644 --- a/apriltag/src/main/java/edu/wpi/first/apriltag/AprilTagFieldLayout.java +++ b/apriltag/src/main/java/edu/wpi/first/apriltag/AprilTagFieldLayout.java @@ -152,9 +152,10 @@ public class AprilTagFieldLayout { var pose = switch (origin) { case kBlueAllianceWallRightSide -> Pose3d.kZero; - case kRedAllianceWallRightSide -> new Pose3d( - new Translation3d(m_fieldDimensions.fieldLength, m_fieldDimensions.fieldWidth, 0), - new Rotation3d(0, 0, Math.PI)); + case kRedAllianceWallRightSide -> + new Pose3d( + new Translation3d(m_fieldDimensions.fieldLength, m_fieldDimensions.fieldWidth, 0), + new Rotation3d(0, 0, Math.PI)); }; setOrigin(pose); } diff --git a/apriltag/src/test/java/edu/wpi/first/apriltag/AprilTagDetectorTest.java b/apriltag/src/test/java/edu/wpi/first/apriltag/AprilTagDetectorTest.java index e290343fa0..4a83016b8c 100644 --- a/apriltag/src/test/java/edu/wpi/first/apriltag/AprilTagDetectorTest.java +++ b/apriltag/src/test/java/edu/wpi/first/apriltag/AprilTagDetectorTest.java @@ -24,7 +24,6 @@ import org.opencv.core.Mat; import org.opencv.imgcodecs.Imgcodecs; import org.opencv.imgproc.Imgproc; -@SuppressWarnings("PMD.MutableStaticState") class AprilTagDetectorTest { @SuppressWarnings("MemberName") AprilTagDetector detector; diff --git a/build.gradle b/build.gradle index 52af95aa35..09ed228753 100644 --- a/build.gradle +++ b/build.gradle @@ -17,10 +17,10 @@ plugins { id 'edu.wpi.first.GradleVsCode' id 'idea' id 'visual-studio' - id 'net.ltgt.errorprone' version '3.1.0' apply false - id 'com.gradleup.shadow' version '8.3.4' apply false - id 'com.diffplug.spotless' version '6.20.0' apply false - id 'com.github.spotbugs' version '6.1.13' apply false + id 'net.ltgt.errorprone' version '4.3.0' apply false + id 'com.gradleup.shadow' version '9.0.0' apply false + id 'com.diffplug.spotless' version '7.2.1' apply false + id 'com.github.spotbugs' version '6.2.3' apply false } wpilibVersioning.buildServerMode = project.hasProperty('buildServer') @@ -82,7 +82,7 @@ task libraryBuild() {} build.dependsOn outputVersions task copyAllOutputs(type: Copy) { - destinationDir outputsFolder + destinationDir = outputsFolder } build.dependsOn copyAllOutputs @@ -171,5 +171,5 @@ ext.getCurrentArch = { } wrapper { - gradleVersion = '8.11' + gradleVersion = '8.14.3' } diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index e65ba5abc2..2abc96dbdf 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -5,7 +5,7 @@ repositories { url = 'https://frcmaven.wpi.edu/artifactory/ex-gradle' } mavenCentral() - url "https://plugins.gradle.org/m2/" + url = "https://plugins.gradle.org/m2/" } } dependencies { diff --git a/cameraserver/multiCameraServer/build.gradle b/cameraserver/multiCameraServer/build.gradle index dab33cd172..4173396371 100644 --- a/cameraserver/multiCameraServer/build.gradle +++ b/cameraserver/multiCameraServer/build.gradle @@ -31,7 +31,7 @@ repositories { } dependencies { - implementation 'com.google.code.gson:gson:2.10.1' + implementation 'com.google.code.gson:gson:2.13.1' implementation project(':wpiutil') implementation project(':wpinet') diff --git a/cameraserver/src/main/java/edu/wpi/first/cameraserver/CameraServer.java b/cameraserver/src/main/java/edu/wpi/first/cameraserver/CameraServer.java index 8bf6ff07ef..7bb5eff433 100644 --- a/cameraserver/src/main/java/edu/wpi/first/cameraserver/CameraServer.java +++ b/cameraserver/src/main/java/edu/wpi/first/cameraserver/CameraServer.java @@ -45,7 +45,7 @@ public final class CameraServer { private static final String kPublishName = "/CameraPublisher"; private static final class PropertyPublisher implements AutoCloseable { - @SuppressWarnings({"PMD.MissingBreakInSwitch", "PMD.ImplicitSwitchFallThrough", "fallthrough"}) + @SuppressWarnings("fallthrough") PropertyPublisher(NetworkTable table, VideoEvent event) { String name; String infoName; @@ -65,7 +65,7 @@ public final class CameraServer { break; case kEnum: m_choicesTopic = table.getStringArrayTopic(infoName + "/choices"); - // fall through + // fallthrough case kInteger: m_integerValueEntry = table.getIntegerTopic(name).getEntry(0); m_minPublisher = table.getIntegerTopic(infoName + "/min").publish(); diff --git a/cameraserver/src/main/java/edu/wpi/first/vision/VisionPipeline.java b/cameraserver/src/main/java/edu/wpi/first/vision/VisionPipeline.java index 29c285f03e..d9e65df896 100644 --- a/cameraserver/src/main/java/edu/wpi/first/vision/VisionPipeline.java +++ b/cameraserver/src/main/java/edu/wpi/first/vision/VisionPipeline.java @@ -13,6 +13,7 @@ import org.opencv.core.Mat; * @see VisionRunner * @see VisionThread */ +@FunctionalInterface public interface VisionPipeline { /** * Processes the image input and sets the result objects. Implementations should make these diff --git a/cscore/src/main/java/edu/wpi/first/cscore/CvSource.java b/cscore/src/main/java/edu/wpi/first/cscore/CvSource.java index 944b58f0eb..4ca03a4194 100644 --- a/cscore/src/main/java/edu/wpi/first/cscore/CvSource.java +++ b/cscore/src/main/java/edu/wpi/first/cscore/CvSource.java @@ -68,8 +68,9 @@ public class CvSource extends ImageSource { case 2 -> PixelFormat.kYUYV; // 2 channels is assumed YUYV case 3 -> PixelFormat.kBGR; // 3 channels is assumed BGR case 4 -> PixelFormat.kBGRA; // 4 channels is assumed BGRA - default -> throw new VideoException( - "Unable to get pixel format for " + channels + " channels"); + default -> + throw new VideoException( + "Unable to get pixel format for " + channels + " channels"); }; putFrame(finalImage, format, true); diff --git a/datalogtool/publish.gradle b/datalogtool/publish.gradle index 6e6f079bc9..4f433961a9 100644 --- a/datalogtool/publish.gradle +++ b/datalogtool/publish.gradle @@ -31,7 +31,7 @@ model { // Create the ZIP. def task = project.tasks.create("copyDataLogToolExecutable" + binary.targetPlatform.operatingSystem.name + binary.targetPlatform.architecture.name, Zip) { - description("Copies the DataLogTool executable to the outputs directory.") + description = "Copies the DataLogTool executable to the outputs directory." destinationDirectory = outputsFolder archiveBaseName = zipBaseName @@ -117,7 +117,7 @@ model { artifactId = baseArtifactId groupId = artifactGroupId - version wpilibVersioning.version.get() + version = wpilibVersioning.version.get() } } } diff --git a/docs/build.gradle b/docs/build.gradle index 9786cd28d8..a97c8c33f4 100644 --- a/docs/build.gradle +++ b/docs/build.gradle @@ -1,6 +1,6 @@ plugins { id 'java' - id "org.ysb33r.doxygen" version "1.0.4" + id "org.ysb33r.doxygen" version "2.0.0" } evaluationDependsOn(':apriltag') @@ -62,12 +62,12 @@ doxygen { } } -doxygen { - template 'Doxyfile' +doxygen.sourceSets.main { + template = 'Doxyfile' cppProjectZips.each { - dependsOn it - source it.source + doxygenDox.dependsOn it + sources it.source it.ext.includeDirs.each { cppIncludeRoots.add(it.absolutePath) } @@ -167,7 +167,7 @@ doxygen { tasks.register("zipCppDocs", Zip) { archiveBaseName = zipBaseNameCpp destinationDirectory = outputsFolder - dependsOn doxygen + dependsOn doxygenDox from ("$buildDir/docs/doxygen/html") into '/' } @@ -175,7 +175,7 @@ tasks.register("zipCppDocs", Zip) { // Java configurations { javaSource { - transitive false + transitive = false } } @@ -263,15 +263,15 @@ publishing { artifact zipJavaDocs artifactId = "${baseArtifactIdJava}" - groupId artifactGroupIdJava - version wpilibVersioning.version.get() + groupId = artifactGroupIdJava + version = wpilibVersioning.version.get() } cpp(MavenPublication) { artifact zipCppDocs artifactId = "${baseArtifactIdCpp}" - groupId artifactGroupIdCpp - version wpilibVersioning.version.get() + groupId = artifactGroupIdCpp + version = wpilibVersioning.version.get() } } } diff --git a/epilogue-processor/src/test/java/edu/wpi/first/epilogue/processor/AnnotationProcessorTest.java b/epilogue-processor/src/test/java/edu/wpi/first/epilogue/processor/AnnotationProcessorTest.java index 50795a45b0..bc6189bf0b 100644 --- a/epilogue-processor/src/test/java/edu/wpi/first/epilogue/processor/AnnotationProcessorTest.java +++ b/epilogue-processor/src/test/java/edu/wpi/first/epilogue/processor/AnnotationProcessorTest.java @@ -2536,7 +2536,8 @@ class AnnotationProcessorTest { class Example {} """; - String packageInfo = """ + String packageInfo = + """ package example; """; diff --git a/epilogue-runtime/src/main/java/edu/wpi/first/epilogue/logging/LogBackedSendableBuilder.java b/epilogue-runtime/src/main/java/edu/wpi/first/epilogue/logging/LogBackedSendableBuilder.java index 4b93a88ee5..a9ebe32aed 100644 --- a/epilogue-runtime/src/main/java/edu/wpi/first/epilogue/logging/LogBackedSendableBuilder.java +++ b/epilogue-runtime/src/main/java/edu/wpi/first/epilogue/logging/LogBackedSendableBuilder.java @@ -19,7 +19,6 @@ import java.util.function.LongSupplier; import java.util.function.Supplier; /** A sendable builder implementation that sends data to a {@link EpilogueBackend}. */ -@SuppressWarnings("PMD.CouplingBetweenObjects") // most methods simply delegate to the backend public class LogBackedSendableBuilder implements SendableBuilder { private final EpilogueBackend m_backend; private final Collection m_updates = new ArrayList<>(); diff --git a/fieldImages/publish.gradle b/fieldImages/publish.gradle index 688376e8b3..1ce268c184 100644 --- a/fieldImages/publish.gradle +++ b/fieldImages/publish.gradle @@ -63,8 +63,8 @@ model { artifact cppSourcesZip artifactId = "${baseArtifactId}-cpp" - groupId artifactGroupId - version wpilibVersioning.version.get() + groupId = artifactGroupId + version = wpilibVersioning.version.get() } } } diff --git a/glass/publish.gradle b/glass/publish.gradle index ab8df4f9ac..a29ad2401c 100644 --- a/glass/publish.gradle +++ b/glass/publish.gradle @@ -86,7 +86,7 @@ model { // Create the ZIP. def task = project.tasks.create("copyGlassExecutable" + binary.targetPlatform.operatingSystem.name + binary.targetPlatform.architecture.name, Zip) { - description("Copies the Glass executable to the outputs directory.") + description = "Copies the Glass executable to the outputs directory." destinationDirectory = outputsFolder archiveBaseName = zipBaseName @@ -175,7 +175,7 @@ model { artifactId = baseArtifactId groupId = artifactGroupId - version wpilibVersioning.version.get() + version = wpilibVersioning.version.get() } libglass(MavenPublication) { libGlassTaskList.each { artifact it } @@ -185,7 +185,7 @@ model { artifactId = libBaseArtifactId groupId = libArtifactGroupId - version wpilibVersioning.version.get() + version = wpilibVersioning.version.get() } libglassnt(MavenPublication) { libGlassntTaskList.each { artifact it } @@ -195,7 +195,7 @@ model { artifactId = libntBaseArtifactId groupId = libntArtifactGroupId - version wpilibVersioning.version.get() + version = wpilibVersioning.version.get() } } } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index a4b76b9530..1b33c55baa 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 94113f200e..d4081da476 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew index f5feea6d6b..23d15a9367 100755 --- a/gradlew +++ b/gradlew @@ -86,8 +86,7 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s -' "$PWD" ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -115,7 +114,7 @@ case "$( uname )" in #( NONSTOP* ) nonstop=true ;; esac -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar +CLASSPATH="\\\"\\\"" # Determine the Java command to use to start the JVM. @@ -206,7 +205,7 @@ fi DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Collect all arguments for the java command: -# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, # and any embedded shellness will be escaped. # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be # treated as '${Hostname}' itself on the command line. @@ -214,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ "$@" # Stop when "xargs" is not available. diff --git a/gradlew.bat b/gradlew.bat index 9b42019c79..5eed7ee845 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -70,11 +70,11 @@ goto fail :execute @rem Setup the command line -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar +set CLASSPATH= @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* :end @rem End local scope for the variables with windows NT shell diff --git a/hal/src/main/java/edu/wpi/first/hal/CANAPITypes.java b/hal/src/main/java/edu/wpi/first/hal/CANAPITypes.java index e485ee6399..cef69b65b2 100644 --- a/hal/src/main/java/edu/wpi/first/hal/CANAPITypes.java +++ b/hal/src/main/java/edu/wpi/first/hal/CANAPITypes.java @@ -53,7 +53,7 @@ public final class CANAPITypes { kFirmwareUpdate(31); /** The device type ID. */ - @SuppressWarnings("PMD.MemberName") + @SuppressWarnings("MemberName") public final int id; CANDeviceType(int id) { @@ -108,7 +108,7 @@ public final class CANAPITypes { kVividHosting(16); /** The manufacturer ID. */ - @SuppressWarnings("PMD.MemberName") + @SuppressWarnings("MemberName") public final int id; CANManufacturer(int id) { diff --git a/hal/src/main/java/edu/wpi/first/hal/PowerDistributionFaults.java b/hal/src/main/java/edu/wpi/first/hal/PowerDistributionFaults.java index 052c72b4cd..ac141c1006 100644 --- a/hal/src/main/java/edu/wpi/first/hal/PowerDistributionFaults.java +++ b/hal/src/main/java/edu/wpi/first/hal/PowerDistributionFaults.java @@ -125,8 +125,8 @@ public class PowerDistributionFaults { case 21 -> Channel21BreakerFault; case 22 -> Channel22BreakerFault; case 23 -> Channel23BreakerFault; - default -> throw new IndexOutOfBoundsException( - "Power distribution fault channel out of bounds!"); + default -> + throw new IndexOutOfBoundsException("Power distribution fault channel out of bounds!"); }; } diff --git a/hal/src/main/java/edu/wpi/first/hal/PowerDistributionStickyFaults.java b/hal/src/main/java/edu/wpi/first/hal/PowerDistributionStickyFaults.java index 4d7836c5e6..aced62501e 100644 --- a/hal/src/main/java/edu/wpi/first/hal/PowerDistributionStickyFaults.java +++ b/hal/src/main/java/edu/wpi/first/hal/PowerDistributionStickyFaults.java @@ -134,8 +134,8 @@ public class PowerDistributionStickyFaults { case 21 -> Channel21BreakerFault; case 22 -> Channel22BreakerFault; case 23 -> Channel23BreakerFault; - default -> throw new IndexOutOfBoundsException( - "Power distribution fault channel out of bounds!"); + default -> + throw new IndexOutOfBoundsException("Power distribution fault channel out of bounds!"); }; } diff --git a/hal/src/main/java/edu/wpi/first/hal/simulation/BufferCallback.java b/hal/src/main/java/edu/wpi/first/hal/simulation/BufferCallback.java index 7c66563a32..efe70af800 100644 --- a/hal/src/main/java/edu/wpi/first/hal/simulation/BufferCallback.java +++ b/hal/src/main/java/edu/wpi/first/hal/simulation/BufferCallback.java @@ -5,6 +5,7 @@ package edu.wpi.first.hal.simulation; /** Interface for simulation buffer callbacks. */ +@FunctionalInterface public interface BufferCallback { /** * Simulation buffer callback function. diff --git a/hal/src/main/java/edu/wpi/first/hal/simulation/ConstBufferCallback.java b/hal/src/main/java/edu/wpi/first/hal/simulation/ConstBufferCallback.java index 9e88ec3a88..21277b3c0b 100644 --- a/hal/src/main/java/edu/wpi/first/hal/simulation/ConstBufferCallback.java +++ b/hal/src/main/java/edu/wpi/first/hal/simulation/ConstBufferCallback.java @@ -4,6 +4,7 @@ package edu.wpi.first.hal.simulation; +@FunctionalInterface public interface ConstBufferCallback { void callback(String name, byte[] buffer, int count); } diff --git a/hal/src/main/java/edu/wpi/first/hal/simulation/NotifyCallback.java b/hal/src/main/java/edu/wpi/first/hal/simulation/NotifyCallback.java index 55605b8167..e0b3233f52 100644 --- a/hal/src/main/java/edu/wpi/first/hal/simulation/NotifyCallback.java +++ b/hal/src/main/java/edu/wpi/first/hal/simulation/NotifyCallback.java @@ -6,6 +6,7 @@ package edu.wpi.first.hal.simulation; import edu.wpi.first.hal.HALValue; +@FunctionalInterface public interface NotifyCallback { void callback(String name, HALValue value); diff --git a/msvcruntime/build.gradle b/msvcruntime/build.gradle index 2bbcd1382c..b8cb6b880e 100644 --- a/msvcruntime/build.gradle +++ b/msvcruntime/build.gradle @@ -1,6 +1,5 @@ import org.gradle.nativeplatform.toolchain.internal.msvcpp.VisualStudioLocator import org.gradle.internal.os.OperatingSystem -import org.gradle.util.VersionNumber plugins { id 'cpp' diff --git a/ntcore/src/generate/main/java/EntryImpl.java.jinja b/ntcore/src/generate/main/java/EntryImpl.java.jinja index 5053e10cdb..e022bd8ac9 100644 --- a/ntcore/src/generate/main/java/EntryImpl.java.jinja +++ b/ntcore/src/generate/main/java/EntryImpl.java.jinja @@ -9,7 +9,6 @@ package edu.wpi.first.networktables; import java.nio.ByteBuffer; {% endif %} /** NetworkTables {{ TypeName }} implementation. */ -@SuppressWarnings("PMD.ArrayIsStoredDirectly") final class {{ TypeName }}EntryImpl extends EntryBase implements {{ TypeName }}Entry { /** * Constructor. diff --git a/ntcore/src/generate/main/java/GenericSubscriber.java.jinja b/ntcore/src/generate/main/java/GenericSubscriber.java.jinja index c0ed6611a9..883d20ecb9 100644 --- a/ntcore/src/generate/main/java/GenericSubscriber.java.jinja +++ b/ntcore/src/generate/main/java/GenericSubscriber.java.jinja @@ -9,7 +9,6 @@ package edu.wpi.first.networktables; import java.util.function.Supplier; /** NetworkTables generic subscriber. */ -@SuppressWarnings("PMD.MissingOverride") public interface GenericSubscriber extends Subscriber, Supplier { /** * Get the corresponding topic. diff --git a/ntcore/src/generate/main/java/NetworkTableValue.java.jinja b/ntcore/src/generate/main/java/NetworkTableValue.java.jinja index 7d82b25b3b..8b0baf1a83 100644 --- a/ntcore/src/generate/main/java/NetworkTableValue.java.jinja +++ b/ntcore/src/generate/main/java/NetworkTableValue.java.jinja @@ -9,7 +9,7 @@ package edu.wpi.first.networktables; import java.util.Objects; /** A network table entry value. */ -@SuppressWarnings({"UnnecessaryParentheses", "PMD.MethodReturnsInternalArray"}) +@SuppressWarnings("UnnecessaryParentheses") public final class NetworkTableValue { NetworkTableValue(NetworkTableType type, Object value, long time, long serverTime) { m_type = type; @@ -176,7 +176,6 @@ public final class NetworkTableValue { return out; } - @SuppressWarnings("PMD.AvoidArrayLoops") static double[] toNativeDoubleArray(Number[] arr) { double[] out = new double[arr.length]; for (int i = 0; i < arr.length; i++) { @@ -185,7 +184,6 @@ public final class NetworkTableValue { return out; } - @SuppressWarnings("PMD.AvoidArrayLoops") static long[] toNativeIntegerArray(Number[] arr) { long[] out = new long[arr.length]; for (int i = 0; i < arr.length; i++) { @@ -194,7 +192,6 @@ public final class NetworkTableValue { return out; } - @SuppressWarnings("PMD.AvoidArrayLoops") static float[] toNativeFloatArray(Number[] arr) { float[] out = new float[arr.length]; for (int i = 0; i < arr.length; i++) { diff --git a/ntcore/src/generate/main/java/Subscriber.java.jinja b/ntcore/src/generate/main/java/Subscriber.java.jinja index 73e6190379..c3531068c7 100644 --- a/ntcore/src/generate/main/java/Subscriber.java.jinja +++ b/ntcore/src/generate/main/java/Subscriber.java.jinja @@ -9,7 +9,6 @@ package edu.wpi.first.networktables; import {{ java.SupplierFunctionPackage|default('java.util.function') }}.{{ java.FunctionTypePrefix }}Supplier; /** NetworkTables {{ TypeName }} subscriber. */ -@SuppressWarnings("PMD.MissingOverride") public interface {{ TypeName }}Subscriber extends Subscriber, {{ java.FunctionTypePrefix }}Supplier{{ java.FunctionTypeSuffix }} { /** * Get the corresponding topic. diff --git a/ntcore/src/generate/main/java/Timestamped.java.jinja b/ntcore/src/generate/main/java/Timestamped.java.jinja index 21e50e244f..0bbd74774e 100644 --- a/ntcore/src/generate/main/java/Timestamped.java.jinja +++ b/ntcore/src/generate/main/java/Timestamped.java.jinja @@ -7,7 +7,6 @@ package edu.wpi.first.networktables; /** NetworkTables timestamped {{ TypeName }}. */ -@SuppressWarnings("PMD.ArrayIsStoredDirectly") public final class Timestamped{{ TypeName }} { /** * Create a timestamped value. diff --git a/ntcore/src/generated/main/java/edu/wpi/first/networktables/BooleanArrayEntryImpl.java b/ntcore/src/generated/main/java/edu/wpi/first/networktables/BooleanArrayEntryImpl.java index 40e455ccac..88ed6cb787 100644 --- a/ntcore/src/generated/main/java/edu/wpi/first/networktables/BooleanArrayEntryImpl.java +++ b/ntcore/src/generated/main/java/edu/wpi/first/networktables/BooleanArrayEntryImpl.java @@ -7,7 +7,6 @@ package edu.wpi.first.networktables; /** NetworkTables BooleanArray implementation. */ -@SuppressWarnings("PMD.ArrayIsStoredDirectly") final class BooleanArrayEntryImpl extends EntryBase implements BooleanArrayEntry { /** * Constructor. diff --git a/ntcore/src/generated/main/java/edu/wpi/first/networktables/BooleanArraySubscriber.java b/ntcore/src/generated/main/java/edu/wpi/first/networktables/BooleanArraySubscriber.java index ff07119840..479336cf2e 100644 --- a/ntcore/src/generated/main/java/edu/wpi/first/networktables/BooleanArraySubscriber.java +++ b/ntcore/src/generated/main/java/edu/wpi/first/networktables/BooleanArraySubscriber.java @@ -9,7 +9,6 @@ package edu.wpi.first.networktables; import java.util.function.Supplier; /** NetworkTables BooleanArray subscriber. */ -@SuppressWarnings("PMD.MissingOverride") public interface BooleanArraySubscriber extends Subscriber, Supplier { /** * Get the corresponding topic. diff --git a/ntcore/src/generated/main/java/edu/wpi/first/networktables/BooleanEntryImpl.java b/ntcore/src/generated/main/java/edu/wpi/first/networktables/BooleanEntryImpl.java index f099afc0da..273bd5e2ed 100644 --- a/ntcore/src/generated/main/java/edu/wpi/first/networktables/BooleanEntryImpl.java +++ b/ntcore/src/generated/main/java/edu/wpi/first/networktables/BooleanEntryImpl.java @@ -7,7 +7,6 @@ package edu.wpi.first.networktables; /** NetworkTables Boolean implementation. */ -@SuppressWarnings("PMD.ArrayIsStoredDirectly") final class BooleanEntryImpl extends EntryBase implements BooleanEntry { /** * Constructor. diff --git a/ntcore/src/generated/main/java/edu/wpi/first/networktables/BooleanSubscriber.java b/ntcore/src/generated/main/java/edu/wpi/first/networktables/BooleanSubscriber.java index 7f54f4b3fd..b037bc0977 100644 --- a/ntcore/src/generated/main/java/edu/wpi/first/networktables/BooleanSubscriber.java +++ b/ntcore/src/generated/main/java/edu/wpi/first/networktables/BooleanSubscriber.java @@ -9,7 +9,6 @@ package edu.wpi.first.networktables; import java.util.function.BooleanSupplier; /** NetworkTables Boolean subscriber. */ -@SuppressWarnings("PMD.MissingOverride") public interface BooleanSubscriber extends Subscriber, BooleanSupplier { /** * Get the corresponding topic. diff --git a/ntcore/src/generated/main/java/edu/wpi/first/networktables/DoubleArrayEntryImpl.java b/ntcore/src/generated/main/java/edu/wpi/first/networktables/DoubleArrayEntryImpl.java index 7bb270ac37..effce7a9b8 100644 --- a/ntcore/src/generated/main/java/edu/wpi/first/networktables/DoubleArrayEntryImpl.java +++ b/ntcore/src/generated/main/java/edu/wpi/first/networktables/DoubleArrayEntryImpl.java @@ -7,7 +7,6 @@ package edu.wpi.first.networktables; /** NetworkTables DoubleArray implementation. */ -@SuppressWarnings("PMD.ArrayIsStoredDirectly") final class DoubleArrayEntryImpl extends EntryBase implements DoubleArrayEntry { /** * Constructor. diff --git a/ntcore/src/generated/main/java/edu/wpi/first/networktables/DoubleArraySubscriber.java b/ntcore/src/generated/main/java/edu/wpi/first/networktables/DoubleArraySubscriber.java index a807d66efc..19f15f5c48 100644 --- a/ntcore/src/generated/main/java/edu/wpi/first/networktables/DoubleArraySubscriber.java +++ b/ntcore/src/generated/main/java/edu/wpi/first/networktables/DoubleArraySubscriber.java @@ -9,7 +9,6 @@ package edu.wpi.first.networktables; import java.util.function.Supplier; /** NetworkTables DoubleArray subscriber. */ -@SuppressWarnings("PMD.MissingOverride") public interface DoubleArraySubscriber extends Subscriber, Supplier { /** * Get the corresponding topic. diff --git a/ntcore/src/generated/main/java/edu/wpi/first/networktables/DoubleEntryImpl.java b/ntcore/src/generated/main/java/edu/wpi/first/networktables/DoubleEntryImpl.java index 968686d502..579834a322 100644 --- a/ntcore/src/generated/main/java/edu/wpi/first/networktables/DoubleEntryImpl.java +++ b/ntcore/src/generated/main/java/edu/wpi/first/networktables/DoubleEntryImpl.java @@ -7,7 +7,6 @@ package edu.wpi.first.networktables; /** NetworkTables Double implementation. */ -@SuppressWarnings("PMD.ArrayIsStoredDirectly") final class DoubleEntryImpl extends EntryBase implements DoubleEntry { /** * Constructor. diff --git a/ntcore/src/generated/main/java/edu/wpi/first/networktables/DoubleSubscriber.java b/ntcore/src/generated/main/java/edu/wpi/first/networktables/DoubleSubscriber.java index 688f6eaed7..c8ec1d0051 100644 --- a/ntcore/src/generated/main/java/edu/wpi/first/networktables/DoubleSubscriber.java +++ b/ntcore/src/generated/main/java/edu/wpi/first/networktables/DoubleSubscriber.java @@ -9,7 +9,6 @@ package edu.wpi.first.networktables; import java.util.function.DoubleSupplier; /** NetworkTables Double subscriber. */ -@SuppressWarnings("PMD.MissingOverride") public interface DoubleSubscriber extends Subscriber, DoubleSupplier { /** * Get the corresponding topic. diff --git a/ntcore/src/generated/main/java/edu/wpi/first/networktables/FloatArrayEntryImpl.java b/ntcore/src/generated/main/java/edu/wpi/first/networktables/FloatArrayEntryImpl.java index 1afe83728b..86753c4019 100644 --- a/ntcore/src/generated/main/java/edu/wpi/first/networktables/FloatArrayEntryImpl.java +++ b/ntcore/src/generated/main/java/edu/wpi/first/networktables/FloatArrayEntryImpl.java @@ -7,7 +7,6 @@ package edu.wpi.first.networktables; /** NetworkTables FloatArray implementation. */ -@SuppressWarnings("PMD.ArrayIsStoredDirectly") final class FloatArrayEntryImpl extends EntryBase implements FloatArrayEntry { /** * Constructor. diff --git a/ntcore/src/generated/main/java/edu/wpi/first/networktables/FloatArraySubscriber.java b/ntcore/src/generated/main/java/edu/wpi/first/networktables/FloatArraySubscriber.java index b70bece391..9e778d37b5 100644 --- a/ntcore/src/generated/main/java/edu/wpi/first/networktables/FloatArraySubscriber.java +++ b/ntcore/src/generated/main/java/edu/wpi/first/networktables/FloatArraySubscriber.java @@ -9,7 +9,6 @@ package edu.wpi.first.networktables; import java.util.function.Supplier; /** NetworkTables FloatArray subscriber. */ -@SuppressWarnings("PMD.MissingOverride") public interface FloatArraySubscriber extends Subscriber, Supplier { /** * Get the corresponding topic. diff --git a/ntcore/src/generated/main/java/edu/wpi/first/networktables/FloatEntryImpl.java b/ntcore/src/generated/main/java/edu/wpi/first/networktables/FloatEntryImpl.java index f7efebfce4..ad0a1d3410 100644 --- a/ntcore/src/generated/main/java/edu/wpi/first/networktables/FloatEntryImpl.java +++ b/ntcore/src/generated/main/java/edu/wpi/first/networktables/FloatEntryImpl.java @@ -7,7 +7,6 @@ package edu.wpi.first.networktables; /** NetworkTables Float implementation. */ -@SuppressWarnings("PMD.ArrayIsStoredDirectly") final class FloatEntryImpl extends EntryBase implements FloatEntry { /** * Constructor. diff --git a/ntcore/src/generated/main/java/edu/wpi/first/networktables/FloatSubscriber.java b/ntcore/src/generated/main/java/edu/wpi/first/networktables/FloatSubscriber.java index 758463b89e..83696ae10a 100644 --- a/ntcore/src/generated/main/java/edu/wpi/first/networktables/FloatSubscriber.java +++ b/ntcore/src/generated/main/java/edu/wpi/first/networktables/FloatSubscriber.java @@ -9,7 +9,6 @@ package edu.wpi.first.networktables; import edu.wpi.first.util.function.FloatSupplier; /** NetworkTables Float subscriber. */ -@SuppressWarnings("PMD.MissingOverride") public interface FloatSubscriber extends Subscriber, FloatSupplier { /** * Get the corresponding topic. diff --git a/ntcore/src/generated/main/java/edu/wpi/first/networktables/GenericSubscriber.java b/ntcore/src/generated/main/java/edu/wpi/first/networktables/GenericSubscriber.java index 7d7ca9639b..35738f2300 100644 --- a/ntcore/src/generated/main/java/edu/wpi/first/networktables/GenericSubscriber.java +++ b/ntcore/src/generated/main/java/edu/wpi/first/networktables/GenericSubscriber.java @@ -9,7 +9,6 @@ package edu.wpi.first.networktables; import java.util.function.Supplier; /** NetworkTables generic subscriber. */ -@SuppressWarnings("PMD.MissingOverride") public interface GenericSubscriber extends Subscriber, Supplier { /** * Get the corresponding topic. diff --git a/ntcore/src/generated/main/java/edu/wpi/first/networktables/IntegerArrayEntryImpl.java b/ntcore/src/generated/main/java/edu/wpi/first/networktables/IntegerArrayEntryImpl.java index e74f4893b9..d26d55f447 100644 --- a/ntcore/src/generated/main/java/edu/wpi/first/networktables/IntegerArrayEntryImpl.java +++ b/ntcore/src/generated/main/java/edu/wpi/first/networktables/IntegerArrayEntryImpl.java @@ -7,7 +7,6 @@ package edu.wpi.first.networktables; /** NetworkTables IntegerArray implementation. */ -@SuppressWarnings("PMD.ArrayIsStoredDirectly") final class IntegerArrayEntryImpl extends EntryBase implements IntegerArrayEntry { /** * Constructor. diff --git a/ntcore/src/generated/main/java/edu/wpi/first/networktables/IntegerArraySubscriber.java b/ntcore/src/generated/main/java/edu/wpi/first/networktables/IntegerArraySubscriber.java index cbb2e6fe81..c77ed10038 100644 --- a/ntcore/src/generated/main/java/edu/wpi/first/networktables/IntegerArraySubscriber.java +++ b/ntcore/src/generated/main/java/edu/wpi/first/networktables/IntegerArraySubscriber.java @@ -9,7 +9,6 @@ package edu.wpi.first.networktables; import java.util.function.Supplier; /** NetworkTables IntegerArray subscriber. */ -@SuppressWarnings("PMD.MissingOverride") public interface IntegerArraySubscriber extends Subscriber, Supplier { /** * Get the corresponding topic. diff --git a/ntcore/src/generated/main/java/edu/wpi/first/networktables/IntegerEntryImpl.java b/ntcore/src/generated/main/java/edu/wpi/first/networktables/IntegerEntryImpl.java index a8db1bff9d..49b691c5e4 100644 --- a/ntcore/src/generated/main/java/edu/wpi/first/networktables/IntegerEntryImpl.java +++ b/ntcore/src/generated/main/java/edu/wpi/first/networktables/IntegerEntryImpl.java @@ -7,7 +7,6 @@ package edu.wpi.first.networktables; /** NetworkTables Integer implementation. */ -@SuppressWarnings("PMD.ArrayIsStoredDirectly") final class IntegerEntryImpl extends EntryBase implements IntegerEntry { /** * Constructor. diff --git a/ntcore/src/generated/main/java/edu/wpi/first/networktables/IntegerSubscriber.java b/ntcore/src/generated/main/java/edu/wpi/first/networktables/IntegerSubscriber.java index 81a9740ef7..bdeb65cc05 100644 --- a/ntcore/src/generated/main/java/edu/wpi/first/networktables/IntegerSubscriber.java +++ b/ntcore/src/generated/main/java/edu/wpi/first/networktables/IntegerSubscriber.java @@ -9,7 +9,6 @@ package edu.wpi.first.networktables; import java.util.function.LongSupplier; /** NetworkTables Integer subscriber. */ -@SuppressWarnings("PMD.MissingOverride") public interface IntegerSubscriber extends Subscriber, LongSupplier { /** * Get the corresponding topic. diff --git a/ntcore/src/generated/main/java/edu/wpi/first/networktables/NetworkTableValue.java b/ntcore/src/generated/main/java/edu/wpi/first/networktables/NetworkTableValue.java index 78786bc6c7..780553c43e 100644 --- a/ntcore/src/generated/main/java/edu/wpi/first/networktables/NetworkTableValue.java +++ b/ntcore/src/generated/main/java/edu/wpi/first/networktables/NetworkTableValue.java @@ -9,7 +9,7 @@ package edu.wpi.first.networktables; import java.util.Objects; /** A network table entry value. */ -@SuppressWarnings({"UnnecessaryParentheses", "PMD.MethodReturnsInternalArray"}) +@SuppressWarnings("UnnecessaryParentheses") public final class NetworkTableValue { NetworkTableValue(NetworkTableType type, Object value, long time, long serverTime) { m_type = type; @@ -668,7 +668,6 @@ public final class NetworkTableValue { return out; } - @SuppressWarnings("PMD.AvoidArrayLoops") static double[] toNativeDoubleArray(Number[] arr) { double[] out = new double[arr.length]; for (int i = 0; i < arr.length; i++) { @@ -677,7 +676,6 @@ public final class NetworkTableValue { return out; } - @SuppressWarnings("PMD.AvoidArrayLoops") static long[] toNativeIntegerArray(Number[] arr) { long[] out = new long[arr.length]; for (int i = 0; i < arr.length; i++) { @@ -686,7 +684,6 @@ public final class NetworkTableValue { return out; } - @SuppressWarnings("PMD.AvoidArrayLoops") static float[] toNativeFloatArray(Number[] arr) { float[] out = new float[arr.length]; for (int i = 0; i < arr.length; i++) { diff --git a/ntcore/src/generated/main/java/edu/wpi/first/networktables/RawEntryImpl.java b/ntcore/src/generated/main/java/edu/wpi/first/networktables/RawEntryImpl.java index 55767f73ea..ab8ca0e1f3 100644 --- a/ntcore/src/generated/main/java/edu/wpi/first/networktables/RawEntryImpl.java +++ b/ntcore/src/generated/main/java/edu/wpi/first/networktables/RawEntryImpl.java @@ -9,7 +9,6 @@ package edu.wpi.first.networktables; import java.nio.ByteBuffer; /** NetworkTables Raw implementation. */ -@SuppressWarnings("PMD.ArrayIsStoredDirectly") final class RawEntryImpl extends EntryBase implements RawEntry { /** * Constructor. diff --git a/ntcore/src/generated/main/java/edu/wpi/first/networktables/RawSubscriber.java b/ntcore/src/generated/main/java/edu/wpi/first/networktables/RawSubscriber.java index 089d999dc2..cf8fc8636e 100644 --- a/ntcore/src/generated/main/java/edu/wpi/first/networktables/RawSubscriber.java +++ b/ntcore/src/generated/main/java/edu/wpi/first/networktables/RawSubscriber.java @@ -9,7 +9,6 @@ package edu.wpi.first.networktables; import java.util.function.Supplier; /** NetworkTables Raw subscriber. */ -@SuppressWarnings("PMD.MissingOverride") public interface RawSubscriber extends Subscriber, Supplier { /** * Get the corresponding topic. diff --git a/ntcore/src/generated/main/java/edu/wpi/first/networktables/StringArrayEntryImpl.java b/ntcore/src/generated/main/java/edu/wpi/first/networktables/StringArrayEntryImpl.java index 536db7b8ac..d97f70b773 100644 --- a/ntcore/src/generated/main/java/edu/wpi/first/networktables/StringArrayEntryImpl.java +++ b/ntcore/src/generated/main/java/edu/wpi/first/networktables/StringArrayEntryImpl.java @@ -7,7 +7,6 @@ package edu.wpi.first.networktables; /** NetworkTables StringArray implementation. */ -@SuppressWarnings("PMD.ArrayIsStoredDirectly") final class StringArrayEntryImpl extends EntryBase implements StringArrayEntry { /** * Constructor. diff --git a/ntcore/src/generated/main/java/edu/wpi/first/networktables/StringArraySubscriber.java b/ntcore/src/generated/main/java/edu/wpi/first/networktables/StringArraySubscriber.java index 62a05759bf..3cd20f2360 100644 --- a/ntcore/src/generated/main/java/edu/wpi/first/networktables/StringArraySubscriber.java +++ b/ntcore/src/generated/main/java/edu/wpi/first/networktables/StringArraySubscriber.java @@ -9,7 +9,6 @@ package edu.wpi.first.networktables; import java.util.function.Supplier; /** NetworkTables StringArray subscriber. */ -@SuppressWarnings("PMD.MissingOverride") public interface StringArraySubscriber extends Subscriber, Supplier { /** * Get the corresponding topic. diff --git a/ntcore/src/generated/main/java/edu/wpi/first/networktables/StringEntryImpl.java b/ntcore/src/generated/main/java/edu/wpi/first/networktables/StringEntryImpl.java index 76c9b98545..7780f4c832 100644 --- a/ntcore/src/generated/main/java/edu/wpi/first/networktables/StringEntryImpl.java +++ b/ntcore/src/generated/main/java/edu/wpi/first/networktables/StringEntryImpl.java @@ -7,7 +7,6 @@ package edu.wpi.first.networktables; /** NetworkTables String implementation. */ -@SuppressWarnings("PMD.ArrayIsStoredDirectly") final class StringEntryImpl extends EntryBase implements StringEntry { /** * Constructor. diff --git a/ntcore/src/generated/main/java/edu/wpi/first/networktables/StringSubscriber.java b/ntcore/src/generated/main/java/edu/wpi/first/networktables/StringSubscriber.java index 8c453b03a4..c11da81341 100644 --- a/ntcore/src/generated/main/java/edu/wpi/first/networktables/StringSubscriber.java +++ b/ntcore/src/generated/main/java/edu/wpi/first/networktables/StringSubscriber.java @@ -9,7 +9,6 @@ package edu.wpi.first.networktables; import java.util.function.Supplier; /** NetworkTables String subscriber. */ -@SuppressWarnings("PMD.MissingOverride") public interface StringSubscriber extends Subscriber, Supplier { /** * Get the corresponding topic. diff --git a/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedBoolean.java b/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedBoolean.java index 05497fcb3b..97b85e68a9 100644 --- a/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedBoolean.java +++ b/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedBoolean.java @@ -7,7 +7,6 @@ package edu.wpi.first.networktables; /** NetworkTables timestamped Boolean. */ -@SuppressWarnings("PMD.ArrayIsStoredDirectly") public final class TimestampedBoolean { /** * Create a timestamped value. diff --git a/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedBooleanArray.java b/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedBooleanArray.java index 51e2591291..0aec21ad59 100644 --- a/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedBooleanArray.java +++ b/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedBooleanArray.java @@ -7,7 +7,6 @@ package edu.wpi.first.networktables; /** NetworkTables timestamped BooleanArray. */ -@SuppressWarnings("PMD.ArrayIsStoredDirectly") public final class TimestampedBooleanArray { /** * Create a timestamped value. diff --git a/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedDouble.java b/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedDouble.java index 586c9fc1d1..7ca5f71c8e 100644 --- a/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedDouble.java +++ b/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedDouble.java @@ -7,7 +7,6 @@ package edu.wpi.first.networktables; /** NetworkTables timestamped Double. */ -@SuppressWarnings("PMD.ArrayIsStoredDirectly") public final class TimestampedDouble { /** * Create a timestamped value. diff --git a/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedDoubleArray.java b/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedDoubleArray.java index aaeafd788e..1d0beb6fda 100644 --- a/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedDoubleArray.java +++ b/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedDoubleArray.java @@ -7,7 +7,6 @@ package edu.wpi.first.networktables; /** NetworkTables timestamped DoubleArray. */ -@SuppressWarnings("PMD.ArrayIsStoredDirectly") public final class TimestampedDoubleArray { /** * Create a timestamped value. diff --git a/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedFloat.java b/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedFloat.java index 4d8aa095df..49cfa15ce7 100644 --- a/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedFloat.java +++ b/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedFloat.java @@ -7,7 +7,6 @@ package edu.wpi.first.networktables; /** NetworkTables timestamped Float. */ -@SuppressWarnings("PMD.ArrayIsStoredDirectly") public final class TimestampedFloat { /** * Create a timestamped value. diff --git a/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedFloatArray.java b/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedFloatArray.java index 85fe7bcac7..8f97ddd85e 100644 --- a/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedFloatArray.java +++ b/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedFloatArray.java @@ -7,7 +7,6 @@ package edu.wpi.first.networktables; /** NetworkTables timestamped FloatArray. */ -@SuppressWarnings("PMD.ArrayIsStoredDirectly") public final class TimestampedFloatArray { /** * Create a timestamped value. diff --git a/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedInteger.java b/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedInteger.java index 0ee7855363..bc518dae33 100644 --- a/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedInteger.java +++ b/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedInteger.java @@ -7,7 +7,6 @@ package edu.wpi.first.networktables; /** NetworkTables timestamped Integer. */ -@SuppressWarnings("PMD.ArrayIsStoredDirectly") public final class TimestampedInteger { /** * Create a timestamped value. diff --git a/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedIntegerArray.java b/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedIntegerArray.java index 8686326996..bb08a85c17 100644 --- a/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedIntegerArray.java +++ b/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedIntegerArray.java @@ -7,7 +7,6 @@ package edu.wpi.first.networktables; /** NetworkTables timestamped IntegerArray. */ -@SuppressWarnings("PMD.ArrayIsStoredDirectly") public final class TimestampedIntegerArray { /** * Create a timestamped value. diff --git a/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedRaw.java b/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedRaw.java index 12ec095e3f..8423d06e7b 100644 --- a/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedRaw.java +++ b/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedRaw.java @@ -7,7 +7,6 @@ package edu.wpi.first.networktables; /** NetworkTables timestamped Raw. */ -@SuppressWarnings("PMD.ArrayIsStoredDirectly") public final class TimestampedRaw { /** * Create a timestamped value. diff --git a/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedString.java b/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedString.java index a51432ee49..c033f3fefd 100644 --- a/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedString.java +++ b/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedString.java @@ -7,7 +7,6 @@ package edu.wpi.first.networktables; /** NetworkTables timestamped String. */ -@SuppressWarnings("PMD.ArrayIsStoredDirectly") public final class TimestampedString { /** * Create a timestamped value. diff --git a/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedStringArray.java b/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedStringArray.java index 420a4685a9..b314fc9125 100644 --- a/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedStringArray.java +++ b/ntcore/src/generated/main/java/edu/wpi/first/networktables/TimestampedStringArray.java @@ -7,7 +7,6 @@ package edu.wpi.first.networktables; /** NetworkTables timestamped StringArray. */ -@SuppressWarnings("PMD.ArrayIsStoredDirectly") public final class TimestampedStringArray { /** * Create a timestamped value. diff --git a/ntcore/src/main/java/edu/wpi/first/networktables/NTSendable.java b/ntcore/src/main/java/edu/wpi/first/networktables/NTSendable.java index 641224d3fc..992cfffe7e 100644 --- a/ntcore/src/main/java/edu/wpi/first/networktables/NTSendable.java +++ b/ntcore/src/main/java/edu/wpi/first/networktables/NTSendable.java @@ -8,6 +8,7 @@ import edu.wpi.first.util.sendable.Sendable; import edu.wpi.first.util.sendable.SendableBuilder; /** Interface for NetworkTable Sendable objects. */ +@SuppressWarnings("PMD.ImplicitFunctionalInterface") public interface NTSendable extends Sendable { /** * Initializes this {@link Sendable} object. diff --git a/ntcore/src/test/java/edu/wpi/first/networktables/RawTest.java b/ntcore/src/test/java/edu/wpi/first/networktables/RawTest.java index 293d4437bd..871f6b0672 100644 --- a/ntcore/src/test/java/edu/wpi/first/networktables/RawTest.java +++ b/ntcore/src/test/java/edu/wpi/first/networktables/RawTest.java @@ -12,7 +12,6 @@ import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -@SuppressWarnings("PMD.SimplifiableTestAssertion") class RawTest { private NetworkTableInstance m_inst; diff --git a/ntcoreffi/build.gradle b/ntcoreffi/build.gradle index 340218a1d1..42645d8aaf 100644 --- a/ntcoreffi/build.gradle +++ b/ntcoreffi/build.gradle @@ -137,8 +137,8 @@ model { artifact cppHeadersZip artifactId = "${baseArtifactId}-cpp" - groupId artifactGroupId - version wpilibVersioning.version.get() + groupId = artifactGroupId + version = wpilibVersioning.version.get() } } } diff --git a/outlineviewer/publish.gradle b/outlineviewer/publish.gradle index 4b5d287fc6..824962e690 100644 --- a/outlineviewer/publish.gradle +++ b/outlineviewer/publish.gradle @@ -31,7 +31,7 @@ model { // Create the ZIP. def task = project.tasks.create("copyOutlineViewerExecutable" + binary.targetPlatform.operatingSystem.name + binary.targetPlatform.architecture.name, Zip) { - description("Copies the OutlineViewer executable to the outputs directory.") + description = "Copies the OutlineViewer executable to the outputs directory." destinationDirectory = outputsFolder archiveBaseName = zipBaseName @@ -117,7 +117,7 @@ model { artifactId = baseArtifactId groupId = artifactGroupId - version wpilibVersioning.version.get() + version = wpilibVersioning.version.get() } } } diff --git a/processstarter/publish.gradle b/processstarter/publish.gradle index 49b4bd42fe..b287bf930a 100644 --- a/processstarter/publish.gradle +++ b/processstarter/publish.gradle @@ -30,7 +30,7 @@ model { // Create the ZIP. def task = project.tasks.create("copyprocessstarterExecutable" + binary.targetPlatform.architecture.name, Zip) { - description("Copies the processstarter executable to the outputs directory.") + description = "Copies the processstarter executable to the outputs directory." destinationDirectory = outputsFolder archiveBaseName = zipBaseName @@ -60,7 +60,7 @@ model { artifactId = baseArtifactId groupId = artifactGroupId - version wpilibVersioning.version.get() + version = wpilibVersioning.version.get() } } } diff --git a/shared/examplecheck.gradle b/shared/examplecheck.gradle index 27a2667b90..006e4194d8 100644 --- a/shared/examplecheck.gradle +++ b/shared/examplecheck.gradle @@ -122,6 +122,7 @@ task checkSnippets(type: Task) { } task checkCommands(type: Task) { + def isCppCommands = project.isCppCommands; doLast { def parsedJson = new groovy.json.JsonSlurper().parseText(commandFile.text) fileCheck(parsedJson, commandDirectory) @@ -132,7 +133,7 @@ task checkCommands(type: Task) { assert it.foldername != null assert it.replacename != null assert it.commandversion != null - if (project.isCppCommands) { + if (isCppCommands) { assert it.headers != null assert !it.headers.isEmpty() assert it.source != null diff --git a/shared/java/javacommon.gradle b/shared/java/javacommon.gradle index b62a61a9f9..a66eb99228 100644 --- a/shared/java/javacommon.gradle +++ b/shared/java/javacommon.gradle @@ -65,18 +65,19 @@ publishing { artifact javadocJar artifactId = "${baseArtifactId}-java" - groupId artifactGroupId - version wpilibVersioning.version.get() + groupId = artifactGroupId + version = wpilibVersioning.version.get() } } } test { + jvmArgs '--enable-native-access=ALL-UNNAMED' useJUnitPlatform() systemProperty 'junit.jupiter.extensions.autodetection.enabled', 'true' testLogging { events "failed" - exceptionFormat "full" + exceptionFormat = "full" } finalizedBy jacocoTestReport } @@ -118,7 +119,7 @@ tasks.withType(JavaCompile).configureEach { } dependencies { - testImplementation 'org.junit.jupiter:junit-jupiter:5.10.1' + testImplementation 'org.junit.jupiter:junit-jupiter:5.13.4' testRuntimeOnly 'org.junit.platform:junit-platform-launcher' devImplementation sourceSets.main.output @@ -133,7 +134,7 @@ task run(type: JavaExec) { build.dependsOn devClasses jacoco { - toolVersion = "0.8.10" + toolVersion = "0.8.13" } jacocoTestReport { diff --git a/shared/java/javastyle.gradle b/shared/java/javastyle.gradle index 337a302596..e81ad9967f 100644 --- a/shared/java/javastyle.gradle +++ b/shared/java/javastyle.gradle @@ -5,7 +5,7 @@ if (project.hasProperty('skipJavaFormat')) { apply plugin: 'checkstyle' checkstyle { - toolVersion = "10.26.1" + toolVersion = "11.0.0" configDirectory = file("${project.rootDir}/styleguide") config = resources.text.fromFile(new File(configDirectory.get().getAsFile(), "checkstyle.xml")) } @@ -13,7 +13,7 @@ checkstyle { apply plugin: 'pmd' pmd { - toolVersion = '7.2.0' + toolVersion = '7.16.0' consoleOutput = true reportsDir = file("$project.buildDir/reports/pmd") ruleSetFiles = files(new File(rootDir, "styleguide/pmd-ruleset.xml")) @@ -40,7 +40,7 @@ spotless { exclude '**/build/**', '**/build-*/**', '**/bin/**' } greclipse() - indentWithSpaces(4) + leadingTabsToSpaces(4) trimTrailingWhitespace() endWithNewline() } @@ -60,7 +60,7 @@ spotless { } eclipseWtp('xml') trimTrailingWhitespace() - indentWithSpaces(2) + leadingTabsToSpaces(2) endWithNewline() } format 'misc', { @@ -69,7 +69,7 @@ spotless { exclude '**/build/**', '**/build-*/**', '**/bin/**' } trimTrailingWhitespace() - indentWithSpaces(2) + leadingTabsToSpaces(2) endWithNewline() } } diff --git a/shared/javacpp/publish.gradle b/shared/javacpp/publish.gradle index 92b7b3df1d..7546388def 100644 --- a/shared/javacpp/publish.gradle +++ b/shared/javacpp/publish.gradle @@ -70,8 +70,8 @@ model { artifact cppSourcesZip artifactId = "${baseArtifactId}-cpp" - groupId artifactGroupId - version wpilibVersioning.version.get() + groupId = artifactGroupId + version = wpilibVersioning.version.get() } } } diff --git a/shared/jni/publish.gradle b/shared/jni/publish.gradle index dd1ec1cb07..9bfe4d0282 100644 --- a/shared/jni/publish.gradle +++ b/shared/jni/publish.gradle @@ -85,8 +85,8 @@ model { artifact cppSourcesZip artifactId = "${baseArtifactId}-cpp" - groupId artifactGroupId - version wpilibVersioning.version.get() + groupId = artifactGroupId + version = wpilibVersioning.version.get() } } @@ -118,8 +118,8 @@ model { } artifactId = "${baseArtifactId}-jnicvstatic" - groupId artifactGroupId - version wpilibVersioning.version.get() + groupId = artifactGroupId + version = wpilibVersioning.version.get() } } } diff --git a/shared/plugins/publish.gradle b/shared/plugins/publish.gradle index 8d7b9d4b71..7c7a980b55 100644 --- a/shared/plugins/publish.gradle +++ b/shared/plugins/publish.gradle @@ -56,8 +56,8 @@ model { artifactId = baseArtifactId - groupId artifactGroupId - version wpilibVersioning.version.get() + groupId = artifactGroupId + version = wpilibVersioning.version.get() } } } diff --git a/styleguide/pmd-ruleset.xml b/styleguide/pmd-ruleset.xml index 8553506b6f..7fd0a469c9 100644 --- a/styleguide/pmd-ruleset.xml +++ b/styleguide/pmd-ruleset.xml @@ -6,8 +6,14 @@ PMD Ruleset for WPILib - .*/*JNI.* + + .*/*EntryImpl\.java + .*/*Subscriber\.java + .*/Timestamped.*\.java + .*/units/measure/.*\.java + .*/*IntegrationTests.* + .*/*JNI.* .*/math/proto.* @@ -18,18 +24,19 @@ - - - - - - + + - + + + + + + @@ -45,8 +52,8 @@ - + @@ -82,6 +89,7 @@ + diff --git a/styleguide/spotbugs-exclude.xml b/styleguide/spotbugs-exclude.xml index 35ff5c8302..bdebdc55f3 100644 --- a/styleguide/spotbugs-exclude.xml +++ b/styleguide/spotbugs-exclude.xml @@ -1,5 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -30,12 +70,21 @@ + + + + - + @@ -45,42 +94,69 @@ - + - + - + - + - + - + - + - + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + @@ -125,35 +201,11 @@ - - - - - - - - - - - - - - - - - - - - + diff --git a/sysid/publish.gradle b/sysid/publish.gradle index 568abea3dd..c998accd30 100644 --- a/sysid/publish.gradle +++ b/sysid/publish.gradle @@ -31,7 +31,7 @@ model { // Create the macOS bundle. def bundleTask = project.tasks.create("bundleSysIdOsxApp" + binary.targetPlatform.architecture.name, Copy) { - description("Creates a macOS application bundle for SysId") + description = "Creates a macOS application bundle for SysId" from(file("$project.projectDir/Info.plist")) into(file("$project.buildDir/outputs/bundles/$binary.targetPlatform.architecture.name/SysId.app/Contents")) into("MacOS") { @@ -74,7 +74,7 @@ model { // Create the ZIP. def task = project.tasks.create("copySysIdExecutable" + binary.targetPlatform.architecture.name, Zip) { - description("Copies the SysId executable to the outputs directory.") + description = "Copies the SysId executable to the outputs directory." destinationDirectory = outputsFolder archiveBaseName = zipBaseName @@ -118,7 +118,7 @@ model { artifactId = baseArtifactId groupId = artifactGroupId - version wpilibVersioning.version.get() + version = wpilibVersioning.version.get() } } } diff --git a/thirdparty/googletest/publish.gradle b/thirdparty/googletest/publish.gradle index 3bcd84dd93..c9ef0172b2 100644 --- a/thirdparty/googletest/publish.gradle +++ b/thirdparty/googletest/publish.gradle @@ -54,8 +54,8 @@ model { artifact cppSourcesZip artifactId = baseArtifactId - groupId artifactGroupId - version wpilibVersioning.version.get() + groupId = artifactGroupId + version = wpilibVersioning.version.get() } } } diff --git a/thirdparty/imgui_suite/publish.gradle b/thirdparty/imgui_suite/publish.gradle index 818a180bfc..943c5cc877 100644 --- a/thirdparty/imgui_suite/publish.gradle +++ b/thirdparty/imgui_suite/publish.gradle @@ -85,8 +85,8 @@ model { artifact cppSourcesZip artifactId = baseArtifactId - groupId artifactGroupId - version wpilibVersioning.version.get() + groupId = artifactGroupId + version = wpilibVersioning.version.get() } } } diff --git a/wpical/publish.gradle b/wpical/publish.gradle index 5af5956239..16875347b8 100644 --- a/wpical/publish.gradle +++ b/wpical/publish.gradle @@ -31,7 +31,7 @@ model { // Create the ZIP. def task = project.tasks.create("copywpicalExecutable" + binary.targetPlatform.operatingSystem.name + binary.targetPlatform.architecture.name, Zip) { - description("Copies the wpical executable to the outputs directory.") + description = "Copies the wpical executable to the outputs directory." destinationDirectory = outputsFolder archiveBaseName = zipBaseName @@ -121,7 +121,7 @@ model { artifactId = baseArtifactId groupId = artifactGroupId - version wpilibVersioning.version.get() + version = wpilibVersioning.version.get() } } } diff --git a/wpigui/publish.gradle b/wpigui/publish.gradle index c137d7c579..6c102cc389 100644 --- a/wpigui/publish.gradle +++ b/wpigui/publish.gradle @@ -63,8 +63,8 @@ model { artifact cppSourcesZip artifactId = baseArtifactId - groupId artifactGroupId - version wpilibVersioning.version.get() + groupId = artifactGroupId + version = wpilibVersioning.version.get() } } } diff --git a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/ParallelRaceGroup.java b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/ParallelRaceGroup.java index 36eaf27543..069f4a8162 100644 --- a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/ParallelRaceGroup.java +++ b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/ParallelRaceGroup.java @@ -42,7 +42,6 @@ public class ParallelRaceGroup extends Command { * * @param commands Commands to add to the group. */ - @SuppressWarnings("PMD.UseArraysAsList") public final void addCommands(Command... commands) { if (!m_finished) { throw new IllegalStateException( diff --git a/wpilibc/publish.gradle b/wpilibc/publish.gradle index a81239bba5..9d72ba6024 100644 --- a/wpilibc/publish.gradle +++ b/wpilibc/publish.gradle @@ -69,8 +69,8 @@ model { artifact cppSourcesZip artifactId = baseArtifactId - groupId artifactGroupId - version wpilibVersioning.version.get() + groupId = artifactGroupId + version = wpilibVersioning.version.get() } } } diff --git a/wpilibcExamples/publish.gradle b/wpilibcExamples/publish.gradle index e0fba64688..0918ea6921 100644 --- a/wpilibcExamples/publish.gradle +++ b/wpilibcExamples/publish.gradle @@ -76,24 +76,24 @@ publishing { artifact cppExamplesZip artifactId = baseExamplesArtifactId - groupId artifactGroupId - version wpilibVersioning.version.get() + groupId = artifactGroupId + version = wpilibVersioning.version.get() } templates(MavenPublication) { artifact cppTemplatesZip artifactId = baseTemplatesArtifactId - groupId artifactGroupId - version wpilibVersioning.version.get() + groupId = artifactGroupId + version = wpilibVersioning.version.get() } commands(MavenPublication) { artifact cppCommandsZip artifactId = baseCommandsArtifactId - groupId artifactGroupId - version wpilibVersioning.version.get() + groupId = artifactGroupId + version = wpilibVersioning.version.get() } } } diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/Alert.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/Alert.java index 828a3e3a21..ae791573e4 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/Alert.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/Alert.java @@ -8,6 +8,7 @@ import edu.wpi.first.util.sendable.Sendable; import edu.wpi.first.util.sendable.SendableBuilder; import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; import java.util.Comparator; +import java.util.EnumMap; import java.util.HashMap; import java.util.Map; import java.util.Set; @@ -186,7 +187,7 @@ public class Alert implements AutoCloseable { private static final class SendableAlerts implements Sendable { private static final Map groups = new HashMap(); - private final Map> m_alerts = new HashMap<>(); + private final EnumMap> m_alerts = new EnumMap<>(AlertType.class); /** * Returns a reference to the set of active alerts for the given type. diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/DriverStation.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/DriverStation.java index 520dd84a3f..2a0f59adde 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/DriverStation.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/DriverStation.java @@ -359,7 +359,6 @@ public final class DriverStation { System.arraycopy(axes.m_axes, 0, m_prevAxes.m_axes, 0, count); } - @SuppressWarnings("PMD.AvoidArrayLoops") void appendPOVs(HALJoystickPOVs povs, long timestamp) { int count = povs.m_count; if (m_sizedPOVs == null || m_sizedPOVs.length != count) { diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/GenericHID.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/GenericHID.java index 2b42b74657..67ac2db26d 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/GenericHID.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/GenericHID.java @@ -71,7 +71,6 @@ public class GenericHID { /** HIDType value. */ public final int value; - @SuppressWarnings("PMD.UseConcurrentHashMap") private static final Map map = new HashMap<>(); HIDType(int value) { diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/I2C.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/I2C.java index 0403207733..cc790023d5 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/I2C.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/I2C.java @@ -35,6 +35,7 @@ public class I2C implements AutoCloseable { private final int m_port; private final int m_deviceAddress; + private ByteBuffer m_readDataToSendBuffer; /** * Constructor. @@ -254,8 +255,6 @@ public class I2C implements AutoCloseable { return transaction(registerAddressArray, registerAddressArray.length, buffer, count); } - private ByteBuffer m_readDataToSendBuffer; - /** * Execute a read transaction with the device. * diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/AddressableLEDSim.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/AddressableLEDSim.java index 83f8931ee0..3069093d45 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/AddressableLEDSim.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/AddressableLEDSim.java @@ -27,7 +27,6 @@ public class AddressableLEDSim { * * @param addressableLED AddressableLED to simulate */ - @SuppressWarnings("PMD.UnusedFormalParameter") public AddressableLEDSim(AddressableLED addressableLED) { m_channel = addressableLED.getChannel(); } diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/CallbackStore.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/CallbackStore.java index 75bae9e767..c6ea362a44 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/CallbackStore.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/simulation/CallbackStore.java @@ -7,16 +7,19 @@ package edu.wpi.first.wpilibj.simulation; /** Manages simulation callbacks; each object is associated with a callback. */ public class CallbackStore implements AutoCloseable { /** Note: This interface is for simulation classes only. It should not be used by teams! */ + @SuppressWarnings("PMD.ImplicitFunctionalInterface") interface CancelCallbackFunc { void cancel(int index, int uid); } /** Note: This interface is for simulation classes only. It should not be used by teams! */ + @SuppressWarnings("PMD.ImplicitFunctionalInterface") interface CancelCallbackChannelFunc { void cancel(int index, int channel, int uid); } /** Note: This interface is for simulation classes only. It should not be used by teams! */ + @SuppressWarnings("PMD.ImplicitFunctionalInterface") interface CancelCallbackNoIndexFunc { void cancel(int uid); } diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/smartdashboard/SendableBuilderImpl.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/smartdashboard/SendableBuilderImpl.java index f38293d88d..8246c352a7 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/smartdashboard/SendableBuilderImpl.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/smartdashboard/SendableBuilderImpl.java @@ -58,7 +58,6 @@ import java.util.function.LongSupplier; import java.util.function.Supplier; /** Implementation detail for SendableBuilder. */ -@SuppressWarnings("PMD.CompareObjectsWithEquals") public class SendableBuilderImpl implements NTSendableBuilder { @FunctionalInterface private interface TimedConsumer { diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/smartdashboard/SmartDashboard.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/smartdashboard/SmartDashboard.java index b9584564ea..fc4cdb6220 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/smartdashboard/SmartDashboard.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/smartdashboard/SmartDashboard.java @@ -28,7 +28,6 @@ public final class SmartDashboard { /** * A table linking tables in the SmartDashboard to the {@link Sendable} objects they came from. */ - @SuppressWarnings("PMD.UseConcurrentHashMap") private static final Map tablesToData = new HashMap<>(); /** The executor for listener tasks; calls listener tasks synchronously from main thread. */ diff --git a/wpilibj/src/test/java/edu/wpi/first/wpilibj/AddressableLEDBufferTest.java b/wpilibj/src/test/java/edu/wpi/first/wpilibj/AddressableLEDBufferTest.java index f1d92d5812..e8ca5a5965 100644 --- a/wpilibj/src/test/java/edu/wpi/first/wpilibj/AddressableLEDBufferTest.java +++ b/wpilibj/src/test/java/edu/wpi/first/wpilibj/AddressableLEDBufferTest.java @@ -103,18 +103,21 @@ class AddressableLEDBufferTest { buffer.forEach( (index, r, g, b) -> { switch (index) { - case 0 -> assertAll( - () -> assertEquals(1, r, "red at index 0"), - () -> assertEquals(2, g, "green at index 0"), - () -> assertEquals(3, b, "blue at index 0")); - case 1 -> assertAll( - () -> assertEquals(4, r, "red at index 1"), - () -> assertEquals(5, g, "green at index 1"), - () -> assertEquals(6, b, "blue at index 1")); - case 2 -> assertAll( - () -> assertEquals(7, r, "red at index 2"), - () -> assertEquals(8, g, "green at index 2"), - () -> assertEquals(9, b, "blue at index 2")); + case 0 -> + assertAll( + () -> assertEquals(1, r, "red at index 0"), + () -> assertEquals(2, g, "green at index 0"), + () -> assertEquals(3, b, "blue at index 0")); + case 1 -> + assertAll( + () -> assertEquals(4, r, "red at index 1"), + () -> assertEquals(5, g, "green at index 1"), + () -> assertEquals(6, b, "blue at index 1")); + case 2 -> + assertAll( + () -> assertEquals(7, r, "red at index 2"), + () -> assertEquals(8, g, "green at index 2"), + () -> assertEquals(9, b, "blue at index 2")); default -> fail("Unexpected index " + index); } }); diff --git a/wpilibjExamples/build.gradle b/wpilibjExamples/build.gradle index 0e8caf4f48..e2269a1975 100644 --- a/wpilibjExamples/build.gradle +++ b/wpilibjExamples/build.gradle @@ -27,12 +27,12 @@ dependencies { implementation project(':epilogue-runtime') annotationProcessor project(':epilogue-processor') - testImplementation 'org.junit.jupiter:junit-jupiter:5.10.1' + testImplementation 'org.junit.jupiter:junit-jupiter:5.13.4' testRuntimeOnly 'org.junit.platform:junit-platform-launcher' } jacoco { - toolVersion = "0.8.10" + toolVersion = "0.8.13" } jacocoTestReport { @@ -160,7 +160,7 @@ model { new groovy.json.JsonSlurper().parseText(exampleFile.text).each { entry -> project.tasks.create("run${entry.foldername}", JavaExec) { run -> - run.group "run examples" + run.group = "run examples" run.mainClass = "edu.wpi.first.wpilibj.examples." + entry.foldername + "." + entry.mainclass run.classpath = sourceSets.main.runtimeClasspath run.dependsOn it.tasks.install @@ -172,7 +172,7 @@ model { } } project.tasks.create("test${entry.foldername}", Test) { testTask -> - testTask.group "verification" + testTask.group = "verification" testTask.useJUnitPlatform() testTask.filter { includeTestsMatching("edu.wpi.first.wpilibj.examples.${entry.foldername}.*") @@ -193,7 +193,7 @@ model { testTask.systemProperty 'junit.jupiter.extensions.autodetection.enabled', 'true' testTask.testLogging { events "failed" - exceptionFormat "full" + exceptionFormat = "full" } testTask.systemProperty 'java.library.path', filePath @@ -205,7 +205,7 @@ model { } new groovy.json.JsonSlurper().parseText(snippetsFile.text).each { entry -> project.tasks.create("runSnippet${entry.foldername}", JavaExec) { run -> - run.group "run snippets" + run.group = "run snippets" run.mainClass = "edu.wpi.first.wpilibj.snippets." + entry.foldername + "." + entry.mainclass run.classpath = sourceSets.main.runtimeClasspath run.dependsOn it.tasks.install @@ -217,7 +217,7 @@ model { } } project.tasks.create("testSnippet${entry.foldername}", Test) { testTask -> - testTask.group "verification" + testTask.group = "verification" testTask.useJUnitPlatform() testTask.filter { includeTestsMatching("edu.wpi.first.wpilibj.snippets.${entry.foldername}.*") @@ -234,7 +234,7 @@ model { testTask.systemProperty 'junit.jupiter.extensions.autodetection.enabled', 'true' testTask.testLogging { events "failed" - exceptionFormat "full" + exceptionFormat = "full" } testTask.systemProperty 'java.library.path', filePath diff --git a/wpilibjExamples/publish.gradle b/wpilibjExamples/publish.gradle index fc90e78909..02c82ca847 100644 --- a/wpilibjExamples/publish.gradle +++ b/wpilibjExamples/publish.gradle @@ -76,24 +76,24 @@ publishing { artifact javaExamplesZip artifactId = baseExamplesArtifactId - groupId artifactGroupId - version wpilibVersioning.version.get() + groupId = artifactGroupId + version = wpilibVersioning.version.get() } templates(MavenPublication) { artifact javaTemplatesZip artifactId = baseTemplatesArtifactId - groupId artifactGroupId - version wpilibVersioning.version.get() + groupId = artifactGroupId + version = wpilibVersioning.version.get() } commands(MavenPublication) { artifact javaCommandsZip artifactId = baseCommandsArtifactId - groupId artifactGroupId - version wpilibVersioning.version.get() + groupId = artifactGroupId + version = wpilibVersioning.version.get() } } } diff --git a/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/templates/commandbased/commands/ExampleCommand.java b/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/templates/commandbased/commands/ExampleCommand.java index 181de6dbb4..36f57ccabb 100644 --- a/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/templates/commandbased/commands/ExampleCommand.java +++ b/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/templates/commandbased/commands/ExampleCommand.java @@ -9,7 +9,7 @@ import edu.wpi.first.wpilibj2.command.Command; /** An example command that uses an example subsystem. */ public class ExampleCommand extends Command { - @SuppressWarnings({"PMD.UnusedPrivateField", "PMD.SingularField"}) + @SuppressWarnings("PMD.UnusedPrivateField") private final ExampleSubsystem m_subsystem; /** diff --git a/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/templates/romicommandbased/commands/ExampleCommand.java b/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/templates/romicommandbased/commands/ExampleCommand.java index c05a53a272..62e8d0ca73 100644 --- a/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/templates/romicommandbased/commands/ExampleCommand.java +++ b/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/templates/romicommandbased/commands/ExampleCommand.java @@ -9,7 +9,7 @@ import edu.wpi.first.wpilibj2.command.Command; /** An example command that uses an example subsystem. */ public class ExampleCommand extends Command { - @SuppressWarnings({"PMD.UnusedPrivateField", "PMD.SingularField"}) + @SuppressWarnings("PMD.UnusedPrivateField") private final RomiDrivetrain m_subsystem; /** diff --git a/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/templates/xrpcommandbased/commands/ExampleCommand.java b/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/templates/xrpcommandbased/commands/ExampleCommand.java index 27f759a8c7..6b352b939e 100644 --- a/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/templates/xrpcommandbased/commands/ExampleCommand.java +++ b/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/templates/xrpcommandbased/commands/ExampleCommand.java @@ -9,7 +9,7 @@ import edu.wpi.first.wpilibj2.command.Command; /** An example command that uses an example subsystem. */ public class ExampleCommand extends Command { - @SuppressWarnings({"PMD.UnusedPrivateField", "PMD.SingularField"}) + @SuppressWarnings("PMD.UnusedPrivateField") private final XRPDrivetrain m_subsystem; /** diff --git a/wpimath/src/generate/main/java/Nat.java.jinja b/wpimath/src/generate/main/java/Nat.java.jinja index 66f06390c2..a65c3c912a 100644 --- a/wpimath/src/generate/main/java/Nat.java.jinja +++ b/wpimath/src/generate/main/java/Nat.java.jinja @@ -18,6 +18,7 @@ import edu.wpi.first.math.numbers.N{{ num }}; * * @param The {@link Num} this represents. */ +@SuppressWarnings("PMD.ImplicitFunctionalInterface") public interface Nat { /** * The number this interface represents. diff --git a/wpimath/src/generated/main/java/edu/wpi/first/math/Nat.java b/wpimath/src/generated/main/java/edu/wpi/first/math/Nat.java index f6b0b81250..f2647738a5 100644 --- a/wpimath/src/generated/main/java/edu/wpi/first/math/Nat.java +++ b/wpimath/src/generated/main/java/edu/wpi/first/math/Nat.java @@ -37,6 +37,7 @@ import edu.wpi.first.math.numbers.N20; * * @param The {@link Num} this represents. */ +@SuppressWarnings("PMD.ImplicitFunctionalInterface") public interface Nat { /** * The number this interface represents. diff --git a/wpimath/src/main/java/edu/wpi/first/math/interpolation/Interpolatable.java b/wpimath/src/main/java/edu/wpi/first/math/interpolation/Interpolatable.java index 9fe09fe475..186ed41841 100644 --- a/wpimath/src/main/java/edu/wpi/first/math/interpolation/Interpolatable.java +++ b/wpimath/src/main/java/edu/wpi/first/math/interpolation/Interpolatable.java @@ -11,6 +11,7 @@ package edu.wpi.first.math.interpolation; * * @param The class that is interpolatable. */ +@SuppressWarnings("PMD.ImplicitFunctionalInterface") public interface Interpolatable { /** * Return the interpolated value. This object is assumed to be the starting position, or lower diff --git a/wpimath/src/main/java/edu/wpi/first/math/spline/SplineHelper.java b/wpimath/src/main/java/edu/wpi/first/math/spline/SplineHelper.java index 2df70589c6..44f4fee85b 100644 --- a/wpimath/src/main/java/edu/wpi/first/math/spline/SplineHelper.java +++ b/wpimath/src/main/java/edu/wpi/first/math/spline/SplineHelper.java @@ -226,7 +226,7 @@ public final class SplineHelper { * @param splines An array of un-optimized quintic splines. * @return An array of optimized quintic splines. */ - @SuppressWarnings({"LocalVariableName", "PMD.AvoidInstantiatingObjectsInLoops"}) + @SuppressWarnings("LocalVariableName") public static QuinticHermiteSpline[] optimizeCurvature(QuinticHermiteSpline[] splines) { // If there's only spline in the array, we can't optimize anything so just return that. if (splines.length < 2) { diff --git a/wpiunits/src/generate/main/java/Measure-implementation.java.jinja b/wpiunits/src/generate/main/java/Measure-implementation.java.jinja index d61c9c6b27..3a303f832e 100644 --- a/wpiunits/src/generate/main/java/Measure-implementation.java.jinja +++ b/wpiunits/src/generate/main/java/Measure-implementation.java.jinja @@ -9,7 +9,7 @@ package edu.wpi.first.units.measure; import static edu.wpi.first.units.Units.*; import edu.wpi.first.units.*; -@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"}) +@SuppressWarnings({"unchecked", "cast", "checkstyle"}) public record {{ helpers['type_decl'](name) }}(double magnitude, double baseUnitMagnitude, {{ helpers['mtou'](name) }} unit) implements Measure<{{ helpers['mtou'](name) }}> { /** * For doing math with measures of a known dimension but an unknown unit. Most users should use @@ -25,7 +25,7 @@ public record {{ helpers['type_decl'](name) }}(double magnitude, double baseUnit /** * For doing math with measures of a known dimension but an unknown unit. Most users should use * {@link {{ name }}Unit#of(double)} on a known unit from {@link Units} instead of calling this method. - * @param magnitude the magnitude of the measurement in terms of the given unit's base unit + * @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit * @param unit the unit of the measurement * @return a measurement object */ diff --git a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Acceleration.java b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Acceleration.java index c1382b1dd0..17badc4684 100644 --- a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Acceleration.java +++ b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Acceleration.java @@ -9,7 +9,7 @@ package edu.wpi.first.units.measure; import static edu.wpi.first.units.Units.*; import edu.wpi.first.units.*; -@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"}) +@SuppressWarnings({"unchecked", "cast", "checkstyle"}) public record Acceleration(double magnitude, double baseUnitMagnitude, AccelerationUnit unit) implements Measure> { /** * For doing math with measures of a known dimension but an unknown unit. Most users should use @@ -25,7 +25,7 @@ public record Acceleration(double magnitude, double baseUnitMagn /** * For doing math with measures of a known dimension but an unknown unit. Most users should use * {@link AccelerationUnit#of(double)} on a known unit from {@link Units} instead of calling this method. - * @param magnitude the magnitude of the measurement in terms of the given unit's base unit + * @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit * @param unit the unit of the measurement * @return a measurement object */ diff --git a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Angle.java b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Angle.java index 1ecadb1a0b..467904ae1a 100644 --- a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Angle.java +++ b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Angle.java @@ -9,7 +9,7 @@ package edu.wpi.first.units.measure; import static edu.wpi.first.units.Units.*; import edu.wpi.first.units.*; -@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"}) +@SuppressWarnings({"unchecked", "cast", "checkstyle"}) public record Angle(double magnitude, double baseUnitMagnitude, AngleUnit unit) implements Measure { /** * For doing math with measures of a known dimension but an unknown unit. Most users should use @@ -25,7 +25,7 @@ public record Angle(double magnitude, double baseUnitMagnitude, AngleUnit unit) /** * For doing math with measures of a known dimension but an unknown unit. Most users should use * {@link AngleUnit#of(double)} on a known unit from {@link Units} instead of calling this method. - * @param magnitude the magnitude of the measurement in terms of the given unit's base unit + * @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit * @param unit the unit of the measurement * @return a measurement object */ diff --git a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/AngularAcceleration.java b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/AngularAcceleration.java index 663ba6e6ab..0a9f54d1c0 100644 --- a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/AngularAcceleration.java +++ b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/AngularAcceleration.java @@ -9,7 +9,7 @@ package edu.wpi.first.units.measure; import static edu.wpi.first.units.Units.*; import edu.wpi.first.units.*; -@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"}) +@SuppressWarnings({"unchecked", "cast", "checkstyle"}) public record AngularAcceleration(double magnitude, double baseUnitMagnitude, AngularAccelerationUnit unit) implements Measure { /** * For doing math with measures of a known dimension but an unknown unit. Most users should use @@ -25,7 +25,7 @@ public record AngularAcceleration(double magnitude, double baseUnitMagnitude, An /** * For doing math with measures of a known dimension but an unknown unit. Most users should use * {@link AngularAccelerationUnit#of(double)} on a known unit from {@link Units} instead of calling this method. - * @param magnitude the magnitude of the measurement in terms of the given unit's base unit + * @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit * @param unit the unit of the measurement * @return a measurement object */ diff --git a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/AngularMomentum.java b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/AngularMomentum.java index 407087f980..ad4ddd3d11 100644 --- a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/AngularMomentum.java +++ b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/AngularMomentum.java @@ -9,7 +9,7 @@ package edu.wpi.first.units.measure; import static edu.wpi.first.units.Units.*; import edu.wpi.first.units.*; -@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"}) +@SuppressWarnings({"unchecked", "cast", "checkstyle"}) public record AngularMomentum(double magnitude, double baseUnitMagnitude, AngularMomentumUnit unit) implements Measure { /** * For doing math with measures of a known dimension but an unknown unit. Most users should use @@ -25,7 +25,7 @@ public record AngularMomentum(double magnitude, double baseUnitMagnitude, Angula /** * For doing math with measures of a known dimension but an unknown unit. Most users should use * {@link AngularMomentumUnit#of(double)} on a known unit from {@link Units} instead of calling this method. - * @param magnitude the magnitude of the measurement in terms of the given unit's base unit + * @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit * @param unit the unit of the measurement * @return a measurement object */ diff --git a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/AngularVelocity.java b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/AngularVelocity.java index 050a28edde..471c005497 100644 --- a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/AngularVelocity.java +++ b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/AngularVelocity.java @@ -9,7 +9,7 @@ package edu.wpi.first.units.measure; import static edu.wpi.first.units.Units.*; import edu.wpi.first.units.*; -@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"}) +@SuppressWarnings({"unchecked", "cast", "checkstyle"}) public record AngularVelocity(double magnitude, double baseUnitMagnitude, AngularVelocityUnit unit) implements Measure { /** * For doing math with measures of a known dimension but an unknown unit. Most users should use @@ -25,7 +25,7 @@ public record AngularVelocity(double magnitude, double baseUnitMagnitude, Angula /** * For doing math with measures of a known dimension but an unknown unit. Most users should use * {@link AngularVelocityUnit#of(double)} on a known unit from {@link Units} instead of calling this method. - * @param magnitude the magnitude of the measurement in terms of the given unit's base unit + * @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit * @param unit the unit of the measurement * @return a measurement object */ diff --git a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Current.java b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Current.java index 8b64da7aef..ae80809314 100644 --- a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Current.java +++ b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Current.java @@ -9,7 +9,7 @@ package edu.wpi.first.units.measure; import static edu.wpi.first.units.Units.*; import edu.wpi.first.units.*; -@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"}) +@SuppressWarnings({"unchecked", "cast", "checkstyle"}) public record Current(double magnitude, double baseUnitMagnitude, CurrentUnit unit) implements Measure { /** * For doing math with measures of a known dimension but an unknown unit. Most users should use @@ -25,7 +25,7 @@ public record Current(double magnitude, double baseUnitMagnitude, CurrentUnit un /** * For doing math with measures of a known dimension but an unknown unit. Most users should use * {@link CurrentUnit#of(double)} on a known unit from {@link Units} instead of calling this method. - * @param magnitude the magnitude of the measurement in terms of the given unit's base unit + * @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit * @param unit the unit of the measurement * @return a measurement object */ diff --git a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Dimensionless.java b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Dimensionless.java index 7cfe940dd5..8f9ca0473b 100644 --- a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Dimensionless.java +++ b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Dimensionless.java @@ -9,7 +9,7 @@ package edu.wpi.first.units.measure; import static edu.wpi.first.units.Units.*; import edu.wpi.first.units.*; -@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"}) +@SuppressWarnings({"unchecked", "cast", "checkstyle"}) public record Dimensionless(double magnitude, double baseUnitMagnitude, DimensionlessUnit unit) implements Measure { /** * For doing math with measures of a known dimension but an unknown unit. Most users should use @@ -25,7 +25,7 @@ public record Dimensionless(double magnitude, double baseUnitMagnitude, Dimensio /** * For doing math with measures of a known dimension but an unknown unit. Most users should use * {@link DimensionlessUnit#of(double)} on a known unit from {@link Units} instead of calling this method. - * @param magnitude the magnitude of the measurement in terms of the given unit's base unit + * @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit * @param unit the unit of the measurement * @return a measurement object */ diff --git a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Distance.java b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Distance.java index 3b044a463d..7bb1cd1754 100644 --- a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Distance.java +++ b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Distance.java @@ -9,7 +9,7 @@ package edu.wpi.first.units.measure; import static edu.wpi.first.units.Units.*; import edu.wpi.first.units.*; -@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"}) +@SuppressWarnings({"unchecked", "cast", "checkstyle"}) public record Distance(double magnitude, double baseUnitMagnitude, DistanceUnit unit) implements Measure { /** * For doing math with measures of a known dimension but an unknown unit. Most users should use @@ -25,7 +25,7 @@ public record Distance(double magnitude, double baseUnitMagnitude, DistanceUnit /** * For doing math with measures of a known dimension but an unknown unit. Most users should use * {@link DistanceUnit#of(double)} on a known unit from {@link Units} instead of calling this method. - * @param magnitude the magnitude of the measurement in terms of the given unit's base unit + * @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit * @param unit the unit of the measurement * @return a measurement object */ diff --git a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Energy.java b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Energy.java index aa5515d77b..5158029b45 100644 --- a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Energy.java +++ b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Energy.java @@ -9,7 +9,7 @@ package edu.wpi.first.units.measure; import static edu.wpi.first.units.Units.*; import edu.wpi.first.units.*; -@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"}) +@SuppressWarnings({"unchecked", "cast", "checkstyle"}) public record Energy(double magnitude, double baseUnitMagnitude, EnergyUnit unit) implements Measure { /** * For doing math with measures of a known dimension but an unknown unit. Most users should use @@ -25,7 +25,7 @@ public record Energy(double magnitude, double baseUnitMagnitude, EnergyUnit unit /** * For doing math with measures of a known dimension but an unknown unit. Most users should use * {@link EnergyUnit#of(double)} on a known unit from {@link Units} instead of calling this method. - * @param magnitude the magnitude of the measurement in terms of the given unit's base unit + * @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit * @param unit the unit of the measurement * @return a measurement object */ diff --git a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Force.java b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Force.java index 962296c1c9..e31fd0aad4 100644 --- a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Force.java +++ b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Force.java @@ -9,7 +9,7 @@ package edu.wpi.first.units.measure; import static edu.wpi.first.units.Units.*; import edu.wpi.first.units.*; -@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"}) +@SuppressWarnings({"unchecked", "cast", "checkstyle"}) public record Force(double magnitude, double baseUnitMagnitude, ForceUnit unit) implements Measure { /** * For doing math with measures of a known dimension but an unknown unit. Most users should use @@ -25,7 +25,7 @@ public record Force(double magnitude, double baseUnitMagnitude, ForceUnit unit) /** * For doing math with measures of a known dimension but an unknown unit. Most users should use * {@link ForceUnit#of(double)} on a known unit from {@link Units} instead of calling this method. - * @param magnitude the magnitude of the measurement in terms of the given unit's base unit + * @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit * @param unit the unit of the measurement * @return a measurement object */ diff --git a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Frequency.java b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Frequency.java index 336ccab0fb..351e799f87 100644 --- a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Frequency.java +++ b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Frequency.java @@ -9,7 +9,7 @@ package edu.wpi.first.units.measure; import static edu.wpi.first.units.Units.*; import edu.wpi.first.units.*; -@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"}) +@SuppressWarnings({"unchecked", "cast", "checkstyle"}) public record Frequency(double magnitude, double baseUnitMagnitude, FrequencyUnit unit) implements Measure { /** * For doing math with measures of a known dimension but an unknown unit. Most users should use @@ -25,7 +25,7 @@ public record Frequency(double magnitude, double baseUnitMagnitude, FrequencyUni /** * For doing math with measures of a known dimension but an unknown unit. Most users should use * {@link FrequencyUnit#of(double)} on a known unit from {@link Units} instead of calling this method. - * @param magnitude the magnitude of the measurement in terms of the given unit's base unit + * @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit * @param unit the unit of the measurement * @return a measurement object */ diff --git a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/LinearAcceleration.java b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/LinearAcceleration.java index e4589cd159..62725432a5 100644 --- a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/LinearAcceleration.java +++ b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/LinearAcceleration.java @@ -9,7 +9,7 @@ package edu.wpi.first.units.measure; import static edu.wpi.first.units.Units.*; import edu.wpi.first.units.*; -@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"}) +@SuppressWarnings({"unchecked", "cast", "checkstyle"}) public record LinearAcceleration(double magnitude, double baseUnitMagnitude, LinearAccelerationUnit unit) implements Measure { /** * For doing math with measures of a known dimension but an unknown unit. Most users should use @@ -25,7 +25,7 @@ public record LinearAcceleration(double magnitude, double baseUnitMagnitude, Lin /** * For doing math with measures of a known dimension but an unknown unit. Most users should use * {@link LinearAccelerationUnit#of(double)} on a known unit from {@link Units} instead of calling this method. - * @param magnitude the magnitude of the measurement in terms of the given unit's base unit + * @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit * @param unit the unit of the measurement * @return a measurement object */ diff --git a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/LinearMomentum.java b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/LinearMomentum.java index 9edfd7b3aa..c254d2f419 100644 --- a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/LinearMomentum.java +++ b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/LinearMomentum.java @@ -9,7 +9,7 @@ package edu.wpi.first.units.measure; import static edu.wpi.first.units.Units.*; import edu.wpi.first.units.*; -@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"}) +@SuppressWarnings({"unchecked", "cast", "checkstyle"}) public record LinearMomentum(double magnitude, double baseUnitMagnitude, LinearMomentumUnit unit) implements Measure { /** * For doing math with measures of a known dimension but an unknown unit. Most users should use @@ -25,7 +25,7 @@ public record LinearMomentum(double magnitude, double baseUnitMagnitude, LinearM /** * For doing math with measures of a known dimension but an unknown unit. Most users should use * {@link LinearMomentumUnit#of(double)} on a known unit from {@link Units} instead of calling this method. - * @param magnitude the magnitude of the measurement in terms of the given unit's base unit + * @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit * @param unit the unit of the measurement * @return a measurement object */ diff --git a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/LinearVelocity.java b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/LinearVelocity.java index 22ccf2c295..1e92346535 100644 --- a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/LinearVelocity.java +++ b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/LinearVelocity.java @@ -9,7 +9,7 @@ package edu.wpi.first.units.measure; import static edu.wpi.first.units.Units.*; import edu.wpi.first.units.*; -@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"}) +@SuppressWarnings({"unchecked", "cast", "checkstyle"}) public record LinearVelocity(double magnitude, double baseUnitMagnitude, LinearVelocityUnit unit) implements Measure { /** * For doing math with measures of a known dimension but an unknown unit. Most users should use @@ -25,7 +25,7 @@ public record LinearVelocity(double magnitude, double baseUnitMagnitude, LinearV /** * For doing math with measures of a known dimension but an unknown unit. Most users should use * {@link LinearVelocityUnit#of(double)} on a known unit from {@link Units} instead of calling this method. - * @param magnitude the magnitude of the measurement in terms of the given unit's base unit + * @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit * @param unit the unit of the measurement * @return a measurement object */ diff --git a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Mass.java b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Mass.java index b21a119ae8..a3df3d4dc4 100644 --- a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Mass.java +++ b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Mass.java @@ -9,7 +9,7 @@ package edu.wpi.first.units.measure; import static edu.wpi.first.units.Units.*; import edu.wpi.first.units.*; -@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"}) +@SuppressWarnings({"unchecked", "cast", "checkstyle"}) public record Mass(double magnitude, double baseUnitMagnitude, MassUnit unit) implements Measure { /** * For doing math with measures of a known dimension but an unknown unit. Most users should use @@ -25,7 +25,7 @@ public record Mass(double magnitude, double baseUnitMagnitude, MassUnit unit) im /** * For doing math with measures of a known dimension but an unknown unit. Most users should use * {@link MassUnit#of(double)} on a known unit from {@link Units} instead of calling this method. - * @param magnitude the magnitude of the measurement in terms of the given unit's base unit + * @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit * @param unit the unit of the measurement * @return a measurement object */ diff --git a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/MomentOfInertia.java b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/MomentOfInertia.java index 06aa4b636e..5f4498c19a 100644 --- a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/MomentOfInertia.java +++ b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/MomentOfInertia.java @@ -9,7 +9,7 @@ package edu.wpi.first.units.measure; import static edu.wpi.first.units.Units.*; import edu.wpi.first.units.*; -@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"}) +@SuppressWarnings({"unchecked", "cast", "checkstyle"}) public record MomentOfInertia(double magnitude, double baseUnitMagnitude, MomentOfInertiaUnit unit) implements Measure { /** * For doing math with measures of a known dimension but an unknown unit. Most users should use @@ -25,7 +25,7 @@ public record MomentOfInertia(double magnitude, double baseUnitMagnitude, Moment /** * For doing math with measures of a known dimension but an unknown unit. Most users should use * {@link MomentOfInertiaUnit#of(double)} on a known unit from {@link Units} instead of calling this method. - * @param magnitude the magnitude of the measurement in terms of the given unit's base unit + * @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit * @param unit the unit of the measurement * @return a measurement object */ diff --git a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Mult.java b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Mult.java index a9c0eadc87..a535d0438c 100644 --- a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Mult.java +++ b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Mult.java @@ -9,7 +9,7 @@ package edu.wpi.first.units.measure; import static edu.wpi.first.units.Units.*; import edu.wpi.first.units.*; -@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"}) +@SuppressWarnings({"unchecked", "cast", "checkstyle"}) public record Mult(double magnitude, double baseUnitMagnitude, MultUnit unit) implements Measure> { /** * For doing math with measures of a known dimension but an unknown unit. Most users should use @@ -25,7 +25,7 @@ public record Mult(double magnitude, double base /** * For doing math with measures of a known dimension but an unknown unit. Most users should use * {@link MultUnit#of(double)} on a known unit from {@link Units} instead of calling this method. - * @param magnitude the magnitude of the measurement in terms of the given unit's base unit + * @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit * @param unit the unit of the measurement * @return a measurement object */ diff --git a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Per.java b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Per.java index e99a34a3e6..c9d1607356 100644 --- a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Per.java +++ b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Per.java @@ -9,7 +9,7 @@ package edu.wpi.first.units.measure; import static edu.wpi.first.units.Units.*; import edu.wpi.first.units.*; -@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"}) +@SuppressWarnings({"unchecked", "cast", "checkstyle"}) public record Per(double magnitude, double baseUnitMagnitude, PerUnit unit) implements Measure> { /** * For doing math with measures of a known dimension but an unknown unit. Most users should use @@ -25,7 +25,7 @@ public record Per(double magnitude, /** * For doing math with measures of a known dimension but an unknown unit. Most users should use * {@link PerUnit#of(double)} on a known unit from {@link Units} instead of calling this method. - * @param magnitude the magnitude of the measurement in terms of the given unit's base unit + * @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit * @param unit the unit of the measurement * @return a measurement object */ diff --git a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Power.java b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Power.java index 30376d06d5..fc9fe2ef88 100644 --- a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Power.java +++ b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Power.java @@ -9,7 +9,7 @@ package edu.wpi.first.units.measure; import static edu.wpi.first.units.Units.*; import edu.wpi.first.units.*; -@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"}) +@SuppressWarnings({"unchecked", "cast", "checkstyle"}) public record Power(double magnitude, double baseUnitMagnitude, PowerUnit unit) implements Measure { /** * For doing math with measures of a known dimension but an unknown unit. Most users should use @@ -25,7 +25,7 @@ public record Power(double magnitude, double baseUnitMagnitude, PowerUnit unit) /** * For doing math with measures of a known dimension but an unknown unit. Most users should use * {@link PowerUnit#of(double)} on a known unit from {@link Units} instead of calling this method. - * @param magnitude the magnitude of the measurement in terms of the given unit's base unit + * @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit * @param unit the unit of the measurement * @return a measurement object */ diff --git a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Resistance.java b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Resistance.java index 81bff183c3..bba5902571 100644 --- a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Resistance.java +++ b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Resistance.java @@ -9,7 +9,7 @@ package edu.wpi.first.units.measure; import static edu.wpi.first.units.Units.*; import edu.wpi.first.units.*; -@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"}) +@SuppressWarnings({"unchecked", "cast", "checkstyle"}) public record Resistance(double magnitude, double baseUnitMagnitude, ResistanceUnit unit) implements Measure { /** * For doing math with measures of a known dimension but an unknown unit. Most users should use @@ -25,7 +25,7 @@ public record Resistance(double magnitude, double baseUnitMagnitude, ResistanceU /** * For doing math with measures of a known dimension but an unknown unit. Most users should use * {@link ResistanceUnit#of(double)} on a known unit from {@link Units} instead of calling this method. - * @param magnitude the magnitude of the measurement in terms of the given unit's base unit + * @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit * @param unit the unit of the measurement * @return a measurement object */ diff --git a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Temperature.java b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Temperature.java index a6fc0a5c7b..05a5f62879 100644 --- a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Temperature.java +++ b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Temperature.java @@ -9,7 +9,7 @@ package edu.wpi.first.units.measure; import static edu.wpi.first.units.Units.*; import edu.wpi.first.units.*; -@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"}) +@SuppressWarnings({"unchecked", "cast", "checkstyle"}) public record Temperature(double magnitude, double baseUnitMagnitude, TemperatureUnit unit) implements Measure { /** * For doing math with measures of a known dimension but an unknown unit. Most users should use @@ -25,7 +25,7 @@ public record Temperature(double magnitude, double baseUnitMagnitude, Temperatur /** * For doing math with measures of a known dimension but an unknown unit. Most users should use * {@link TemperatureUnit#of(double)} on a known unit from {@link Units} instead of calling this method. - * @param magnitude the magnitude of the measurement in terms of the given unit's base unit + * @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit * @param unit the unit of the measurement * @return a measurement object */ diff --git a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Time.java b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Time.java index 2c95f2bf2e..29afd979df 100644 --- a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Time.java +++ b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Time.java @@ -9,7 +9,7 @@ package edu.wpi.first.units.measure; import static edu.wpi.first.units.Units.*; import edu.wpi.first.units.*; -@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"}) +@SuppressWarnings({"unchecked", "cast", "checkstyle"}) public record Time(double magnitude, double baseUnitMagnitude, TimeUnit unit) implements Measure { /** * For doing math with measures of a known dimension but an unknown unit. Most users should use @@ -25,7 +25,7 @@ public record Time(double magnitude, double baseUnitMagnitude, TimeUnit unit) im /** * For doing math with measures of a known dimension but an unknown unit. Most users should use * {@link TimeUnit#of(double)} on a known unit from {@link Units} instead of calling this method. - * @param magnitude the magnitude of the measurement in terms of the given unit's base unit + * @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit * @param unit the unit of the measurement * @return a measurement object */ diff --git a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Torque.java b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Torque.java index 4cf3afb123..bfa6873c6e 100644 --- a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Torque.java +++ b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Torque.java @@ -9,7 +9,7 @@ package edu.wpi.first.units.measure; import static edu.wpi.first.units.Units.*; import edu.wpi.first.units.*; -@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"}) +@SuppressWarnings({"unchecked", "cast", "checkstyle"}) public record Torque(double magnitude, double baseUnitMagnitude, TorqueUnit unit) implements Measure { /** * For doing math with measures of a known dimension but an unknown unit. Most users should use @@ -25,7 +25,7 @@ public record Torque(double magnitude, double baseUnitMagnitude, TorqueUnit unit /** * For doing math with measures of a known dimension but an unknown unit. Most users should use * {@link TorqueUnit#of(double)} on a known unit from {@link Units} instead of calling this method. - * @param magnitude the magnitude of the measurement in terms of the given unit's base unit + * @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit * @param unit the unit of the measurement * @return a measurement object */ diff --git a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Velocity.java b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Velocity.java index f8ef481d53..a8df85d3b7 100644 --- a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Velocity.java +++ b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Velocity.java @@ -9,7 +9,7 @@ package edu.wpi.first.units.measure; import static edu.wpi.first.units.Units.*; import edu.wpi.first.units.*; -@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"}) +@SuppressWarnings({"unchecked", "cast", "checkstyle"}) public record Velocity(double magnitude, double baseUnitMagnitude, VelocityUnit unit) implements Measure> { /** * For doing math with measures of a known dimension but an unknown unit. Most users should use @@ -25,7 +25,7 @@ public record Velocity(double magnitude, double baseUnitMagnitud /** * For doing math with measures of a known dimension but an unknown unit. Most users should use * {@link VelocityUnit#of(double)} on a known unit from {@link Units} instead of calling this method. - * @param magnitude the magnitude of the measurement in terms of the given unit's base unit + * @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit * @param unit the unit of the measurement * @return a measurement object */ diff --git a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Voltage.java b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Voltage.java index 06ae7b4074..94aa0a6460 100644 --- a/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Voltage.java +++ b/wpiunits/src/generated/main/java/edu/wpi/first/units/measure/Voltage.java @@ -9,7 +9,7 @@ package edu.wpi.first.units.measure; import static edu.wpi.first.units.Units.*; import edu.wpi.first.units.*; -@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"}) +@SuppressWarnings({"unchecked", "cast", "checkstyle"}) public record Voltage(double magnitude, double baseUnitMagnitude, VoltageUnit unit) implements Measure { /** * For doing math with measures of a known dimension but an unknown unit. Most users should use @@ -25,7 +25,7 @@ public record Voltage(double magnitude, double baseUnitMagnitude, VoltageUnit un /** * For doing math with measures of a known dimension but an unknown unit. Most users should use * {@link VoltageUnit#of(double)} on a known unit from {@link Units} instead of calling this method. - * @param magnitude the magnitude of the measurement in terms of the given unit's base unit + * @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit * @param unit the unit of the measurement * @return a measurement object */ diff --git a/wpiutil/src/main/java/edu/wpi/first/util/cleanup/ReflectionCleanup.java b/wpiutil/src/main/java/edu/wpi/first/util/cleanup/ReflectionCleanup.java index 0803028f40..bed453ef21 100644 --- a/wpiutil/src/main/java/edu/wpi/first/util/cleanup/ReflectionCleanup.java +++ b/wpiutil/src/main/java/edu/wpi/first/util/cleanup/ReflectionCleanup.java @@ -11,6 +11,7 @@ import java.lang.reflect.Field; * your `close` method, that will use reflection to find all `AutoCloseable` instance members and * close them. */ +@SuppressWarnings("PMD.ImplicitFunctionalInterface") public interface ReflectionCleanup extends AutoCloseable { /** * Default implementation that uses reflection to find all AutoCloseable fields not marked diff --git a/wpiutil/src/main/java/edu/wpi/first/util/sendable/Sendable.java b/wpiutil/src/main/java/edu/wpi/first/util/sendable/Sendable.java index ad1fe28d09..e593e48c2e 100644 --- a/wpiutil/src/main/java/edu/wpi/first/util/sendable/Sendable.java +++ b/wpiutil/src/main/java/edu/wpi/first/util/sendable/Sendable.java @@ -5,6 +5,7 @@ package edu.wpi.first.util.sendable; /** The base interface for objects that can be sent over the network. */ +@SuppressWarnings("PMD.ImplicitFunctionalInterface") public interface Sendable { /** * Initializes this {@link Sendable} object. diff --git a/wpiutil/src/test/java/edu/wpi/first/util/cleanup/CleanupPoolTest.java b/wpiutil/src/test/java/edu/wpi/first/util/cleanup/CleanupPoolTest.java index a953a855e6..2906bf2f9f 100644 --- a/wpiutil/src/test/java/edu/wpi/first/util/cleanup/CleanupPoolTest.java +++ b/wpiutil/src/test/java/edu/wpi/first/util/cleanup/CleanupPoolTest.java @@ -87,7 +87,6 @@ class CleanupPoolTest { } @Test - @SuppressWarnings("PMD.AvoidCatchingGenericException") void cleanupStackWithExceptionInCloseWorks() { List objects = new ArrayList<>(); objects.add(new AutoCloseableObject());