diff --git a/src/org/jgroups/protocols/relay/RELAY.java b/src/org/jgroups/protocols/relay/RELAY.java index 1f67610fb1..19c1b5f891 100644 --- a/src/org/jgroups/protocols/relay/RELAY.java +++ b/src/org/jgroups/protocols/relay/RELAY.java @@ -223,9 +223,9 @@ public Route getRoute(String site_name) { * @return A {@link List} of sites name that are currently up or {@code null} if this node is not a Site Master (i.e. * {@link #isSiteMaster()} returns false). */ - public Collection getCurrentSites() { + public List getCurrentSites() { // must return a List, as Infinispan expects a List (not a Collection) Relayer rel=relayer; - return rel == null ? null : rel.getSiteNames(); + return rel == null ? null : new ArrayList<>(rel.getSiteNames()); } /**