Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D8DE718296 for ; Fri, 15 Jan 2016 10:18:31 +0000 (UTC) Received: (qmail 28610 invoked by uid 500); 15 Jan 2016 10:18:31 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 28327 invoked by uid 500); 15 Jan 2016 10:18:31 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 28304 invoked by uid 99); 15 Jan 2016 10:18:31 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Jan 2016 10:18:31 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 40F9CDFBEE; Fri, 15 Jan 2016 10:18:31 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: blerer@apache.org To: commits@cassandra.apache.org Date: Fri, 15 Jan 2016 10:18:31 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [1/2] cassandra git commit: Ninja fix: Fix eclipse compilation issue with raw types 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 Authored: Fri Jan 15 11:15:26 2016 +0100 Committer: Benjamin Lerer 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