cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [2/2] git commit: cleanup
Date Sun, 09 Sep 2012 03:15:07 GMT
cleanup


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

Branch: refs/heads/trunk
Commit: 18962d7b28e1d471c59e0e95c99b2a09b6a9402c
Parents: 8b374b2
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Sat Sep 8 22:10:04 2012 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Sat Sep 8 22:10:04 2012 -0500

----------------------------------------------------------------------
 .../apache/cassandra/locator/TokenMetadata.java    |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/18962d7b/src/java/org/apache/cassandra/locator/TokenMetadata.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/locator/TokenMetadata.java b/src/java/org/apache/cassandra/locator/TokenMetadata.java
index 582ad10..c666c47 100644
--- a/src/java/org/apache/cassandra/locator/TokenMetadata.java
+++ b/src/java/org/apache/cassandra/locator/TokenMetadata.java
@@ -95,7 +95,6 @@ public class TokenMetadata
 
     private static final Comparator<InetAddress> inetaddressCmp = new Comparator<InetAddress>()
     {
-        @Override
         public int compare(InetAddress o1, InetAddress o2)
         {
             return ByteBuffer.wrap(o1.getAddress()).compareTo(ByteBuffer.wrap(o2.getAddress()));
@@ -685,7 +684,7 @@ public class TokenMetadata
             return includeMin ? Iterators.singletonIterator(StorageService.getPartitioner().getMinimumToken())
                               : Iterators.<Token>emptyIterator();
 
-        final boolean insertMin = (includeMin && !ring.get(0).isMinimum()) ? true
: false;
+        final boolean insertMin = includeMin && !ring.get(0).isMinimum();
         final int startIndex = firstTokenIndex(ring, start, insertMin);
         return new AbstractIterator<Token>()
         {
@@ -754,7 +753,7 @@ public class TokenMetadata
                 sb.append(System.getProperty("line.separator"));
                 for (Map.Entry<Token, InetAddress> entry : bootstrapTokens.entrySet())
                 {
-                    sb.append(entry.getValue() + ":" + entry.getKey());
+                    sb.append(entry.getValue()).append(":").append(entry.getKey());
                     sb.append(System.getProperty("line.separator"));
                 }
             }
@@ -793,7 +792,7 @@ public class TokenMetadata
         {
             for (Map.Entry<Range<Token>, InetAddress> rmap : entry.getValue().entries())
             {
-                sb.append(rmap.getValue() + ":" + rmap.getKey());
+                sb.append(rmap.getValue()).append(":").append(rmap.getKey());
                 sb.append(System.getProperty("line.separator"));
             }
         }
@@ -854,7 +853,7 @@ public class TokenMetadata
         lock.readLock().lock();
         try
         {
-            Multimap<InetAddress, Token> cloned = HashMultimap.<InetAddress, Token>create();
+            Multimap<InetAddress, Token> cloned = HashMultimap.create();
             for (Map.Entry<Token, InetAddress> entry : tokenToEndpointMap.entrySet())
                 cloned.put(entry.getValue(), entry.getKey());
             return cloned;


Mime
View raw message