diff --git a/plugins/networktables/src/main/java/edu/wpi/first/shuffleboard/plugin/networktables/sources/NetworkTableSource.java b/plugins/networktables/src/main/java/edu/wpi/first/shuffleboard/plugin/networktables/sources/NetworkTableSource.java index 876df539d..e1cf6d02b 100644 --- a/plugins/networktables/src/main/java/edu/wpi/first/shuffleboard/plugin/networktables/sources/NetworkTableSource.java +++ b/plugins/networktables/src/main/java/edu/wpi/first/shuffleboard/plugin/networktables/sources/NetworkTableSource.java @@ -14,9 +14,9 @@ import edu.wpi.first.networktables.NetworkTableInstance; import java.util.EnumSet; -import java.util.HashMap; import java.util.Map; import java.util.Optional; +import java.util.concurrent.ConcurrentHashMap; /** * A source for data in network tables. Data can be a single value or a map of keys to values. @@ -28,7 +28,7 @@ */ public abstract class NetworkTableSource extends AbstractDataSource { - private static final Map sources = new HashMap<>(); + private static final Map sources = new ConcurrentHashMap<>(); protected final String fullTableKey; private int listenerUid = -1;