cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject git commit: use ImmutableSet instead of unmodifiableSet
Date Fri, 10 May 2013 01:41:19 GMT
Updated Branches:
  refs/heads/trunk 156fb112d -> 0e4bf0916


use ImmutableSet instead of unmodifiableSet


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/0e4bf091
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/0e4bf091
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/0e4bf091

Branch: refs/heads/trunk
Commit: 0e4bf0916d971a1e3194b2b9dbb0654eedc863ce
Parents: 156fb11
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Thu May 9 20:41:09 2013 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Thu May 9 20:41:09 2013 -0500

----------------------------------------------------------------------
 .../cassandra/config/DatabaseDescriptor.java       |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/0e4bf091/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
index 8b1b223..a8e6adf 100644
--- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
+++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
@@ -25,6 +25,7 @@ import java.net.UnknownHostException;
 import java.util.*;
 
 import com.google.common.annotations.VisibleForTesting;
+import com.google.common.collect.ImmutableSet;
 import com.google.common.primitives.Longs;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -874,7 +875,7 @@ public class DatabaseDescriptor
 
     public static Set<InetAddress> getSeeds()
     {
-        return Collections.unmodifiableSet(new HashSet<InetAddress>(seedProvider.getSeeds()));
+        return ImmutableSet.<InetAddress>builder().addAll(seedProvider.getSeeds()).build();
     }
 
     public static InetAddress getListenAddress()


Mime
View raw message