From 9ba01e8156222c02f932216c7d3a660b8200e70c Mon Sep 17 00:00:00 2001 From: Woonduk Kang Date: Tue, 13 Sep 2016 13:51:32 +0900 Subject: [PATCH] fixed jdk 8 KeySetView compatibility (#2095) --- .../connection/CollectorClusterConnectionRepository.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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() {