diff --git a/collector/src/main/java/com/navercorp/pinpoint/collector/cluster/connection/CollectorClusterConnectionRepository.java b/collector/src/main/java/com/navercorp/pinpoint/collector/cluster/connection/CollectorClusterConnectionRepository.java index 11e03861e680..4ca813e8120a 100644 --- a/collector/src/main/java/com/navercorp/pinpoint/collector/cluster/connection/CollectorClusterConnectionRepository.java +++ b/collector/src/main/java/com/navercorp/pinpoint/collector/cluster/connection/CollectorClusterConnectionRepository.java @@ -19,11 +19,13 @@ package com.navercorp.pinpoint.collector.cluster.connection; +import com.google.common.collect.Lists; import com.navercorp.pinpoint.rpc.PinpointSocket; import java.net.SocketAddress; import java.util.ArrayList; import java.util.List; +import java.util.Set; import java.util.concurrent.ConcurrentHashMap; /** @@ -46,7 +48,9 @@ public boolean containsKey(SocketAddress address) { } public List getAddressList() { - return new ArrayList<>(clusterConnectionRepository.keySet()); + // fix jdk 8 KeySetView compatibility + Set socketAddresses = clusterConnectionRepository.keySet(); + return new ArrayList<>(socketAddresses); } public List getClusterSocketList() {