cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ble...@apache.org
Subject [1/2] cassandra git commit: Ninja fix: Fix eclipse compilation issue with raw types
Date Fri, 15 Jan 2016 10:18:31 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.3 c35484ad1 -> b48d71cc6


Ninja fix: Fix eclipse compilation issue with raw types


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

Branch: refs/heads/cassandra-3.3
Commit: 97e8953ec5ced40ba58839df6f1a23af797eda1e
Parents: e0c27bc
Author: Benjamin Lerer <b.lerer@gmail.com>
Authored: Fri Jan 15 11:15:26 2016 +0100
Committer: Benjamin Lerer <b.lerer@gmail.com>
Committed: Fri Jan 15 11:16:39 2016 +0100

----------------------------------------------------------------------
 src/java/org/apache/cassandra/db/view/TemporalRow.java | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/97e8953e/src/java/org/apache/cassandra/db/view/TemporalRow.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/view/TemporalRow.java b/src/java/org/apache/cassandra/db/view/TemporalRow.java
index 8ee310d..23705b9 100644
--- a/src/java/org/apache/cassandra/db/view/TemporalRow.java
+++ b/src/java/org/apache/cassandra/db/view/TemporalRow.java
@@ -18,6 +18,9 @@
 
 package org.apache.cassandra.db.view;
 
+import static java.util.Comparator.naturalOrder;
+import static java.util.Comparator.reverseOrder;
+
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -305,18 +308,14 @@ public class TemporalRow
      *
      * Local Deletion Time should use max, as this deletion will cover all previous values
written.
      */
-    @SuppressWarnings("unchecked")
     private void updateLiveness(int ttl, long timestamp, int localDeletionTime)
     {
         // We are returning whichever is higher from valueIfSet
         // Natural order will return the max: 1.compareTo(2) < 0, so 2 is returned
         // Reverse order will return the min: 1.compareTo(2) > 0, so 1 is returned
-        final Comparator max = Comparator.naturalOrder();
-        final Comparator min = Comparator.reverseOrder();
-
-        this.viewClusteringTtl = valueIfSet(viewClusteringTtl, ttl, NO_TTL, min);
-        this.viewClusteringTimestamp = valueIfSet(viewClusteringTimestamp, timestamp, NO_TIMESTAMP,
max);
-        this.viewClusteringLocalDeletionTime = valueIfSet(viewClusteringLocalDeletionTime,
localDeletionTime, NO_DELETION_TIME, max);
+        this.viewClusteringTtl = valueIfSet(viewClusteringTtl, ttl, NO_TTL, reverseOrder());
+        this.viewClusteringTimestamp = valueIfSet(viewClusteringTimestamp, timestamp, NO_TIMESTAMP,
naturalOrder());
+        this.viewClusteringLocalDeletionTime = valueIfSet(viewClusteringLocalDeletionTime,
localDeletionTime, NO_DELETION_TIME, naturalOrder());
     }
 
     @Override


Mime
View raw message