Fix multiple Java warnings (#6201)

This commit is contained in:
Thad House
2024-01-12 08:46:21 -08:00
committed by GitHub
parent ba9c21cf38
commit 1981b8debd
15 changed files with 44 additions and 34 deletions

View File

@@ -27,6 +27,7 @@ import edu.wpi.first.networktables.StringArrayTopic;
import edu.wpi.first.networktables.StringEntry;
import edu.wpi.first.networktables.StringPublisher;
import edu.wpi.first.util.PixelFormat;
import java.lang.ref.Reference;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
@@ -140,6 +141,7 @@ public final class CameraServer {
if (m_choicesPublisher != null) {
m_choicesPublisher.close();
}
Reference.reachabilityFence(m_videoListener);
}
BooleanEntry m_booleanValueEntry;
@@ -223,7 +225,7 @@ public final class CameraServer {
// - "PropertyInfo/{Property}" - Property supporting information
// Listener for video events
@SuppressWarnings({"PMD.UnusedPrivateField", "PMD.AvoidCatchingGenericException"})
@SuppressWarnings("PMD.AvoidCatchingGenericException")
private static final VideoListener m_videoListener =
new VideoListener(
event -> {