cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbros...@apache.org
Subject [1/2] git commit: simplify: prefer containsKey(x) to keySet().contains(x)
Date Tue, 10 Jun 2014 01:42:20 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 bb58d80d1 -> 3e5f2bd64


simplify: prefer containsKey(x) to keySet().contains(x)


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

Branch: refs/heads/cassandra-2.0
Commit: f40ddba4779551344b8ec982c549ae082edcb5f3
Parents: 19a2077
Author: Dave Brosius <dbrosius@mebigfatguy.com>
Authored: Mon Jun 9 21:40:45 2014 -0400
Committer: Dave Brosius <dbrosius@mebigfatguy.com>
Committed: Mon Jun 9 21:40:45 2014 -0400

----------------------------------------------------------------------
 src/java/org/apache/cassandra/gms/Gossiper.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f40ddba4/src/java/org/apache/cassandra/gms/Gossiper.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/gms/Gossiper.java b/src/java/org/apache/cassandra/gms/Gossiper.java
index caadb3e..a2addd1 100644
--- a/src/java/org/apache/cassandra/gms/Gossiper.java
+++ b/src/java/org/apache/cassandra/gms/Gossiper.java
@@ -194,7 +194,7 @@ public class Gossiper implements IFailureDetectionEventListener, GossiperMBean
                 return true;
             try
             {
-                if (entry.getValue().getApplicationStateMap().keySet().contains(ApplicationState.INTERNAL_IP)
&& seeds.contains(InetAddress.getByName(entry.getValue().getApplicationState(ApplicationState.INTERNAL_IP).value)))
+                if (entry.getValue().getApplicationStateMap().containsKey(ApplicationState.INTERNAL_IP)
&& seeds.contains(InetAddress.getByName(entry.getValue().getApplicationState(ApplicationState.INTERNAL_IP).value)))
                     return true;
             }
             catch (UnknownHostException e)


Mime
View raw message