fix: Uses a regular HashSet.

This commit is contained in:
Boris Grozev 2016-12-12 13:34:54 -06:00
parent d0587e99e6
commit 9c8d22a5bd

View File

@ -52,9 +52,7 @@ public class ComponentSocket
* from. These should be the addresses which we have confirmed (e.g. by
* having received a STUN message with correct authentication fields).
*/
private Set<SocketAddress> authorizedAddresses
= Collections.newSetFromMap(
new ConcurrentHashMap<SocketAddress, Boolean>());
private Set<SocketAddress> authorizedAddresses = new HashSet<>();
/**
* The owning {@link Component}.
@ -110,9 +108,7 @@ public class ComponentSocket
logger.info("Adding allowed address: " + address);
Set<SocketAddress> newSet
= Collections.newSetFromMap(
new ConcurrentHashMap<SocketAddress, Boolean>());
Set<SocketAddress> newSet = new HashSet<>();
newSet.addAll(authorizedAddresses);
newSet.add(address);