cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [01/10] cassandra git commit: Add comment on DateType explaining that its kept only for backward compatibility
Date Wed, 03 Feb 2016 11:14:44 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.2 af2b85842 -> 3ec7d8c05
  refs/heads/cassandra-3.0 f51e98399 -> 8cb5a20c6
  refs/heads/cassandra-3.3 c5feeda6a -> 35a7194e7
  refs/heads/trunk eef0ddfab -> f1f52e7bb


Add comment on DateType explaining that its kept only for backward compatibility


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

Branch: refs/heads/cassandra-2.2
Commit: 3ec7d8c056c71b3032b1ca1d1fd07462c5091900
Parents: af2b858
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Wed Feb 3 12:08:13 2016 +0100
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Wed Feb 3 12:08:13 2016 +0100

----------------------------------------------------------------------
 src/java/org/apache/cassandra/db/marshal/DateType.java | 5 +++++
 src/java/org/apache/cassandra/db/marshal/TimeType.java | 6 ------
 2 files changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/3ec7d8c0/src/java/org/apache/cassandra/db/marshal/DateType.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/marshal/DateType.java b/src/java/org/apache/cassandra/db/marshal/DateType.java
index 82ed876..5186ca8 100644
--- a/src/java/org/apache/cassandra/db/marshal/DateType.java
+++ b/src/java/org/apache/cassandra/db/marshal/DateType.java
@@ -31,6 +31,11 @@ import org.apache.cassandra.serializers.TimestampSerializer;
 import org.apache.cassandra.serializers.MarshalException;
 import org.apache.cassandra.utils.ByteBufferUtil;
 
+/**
+ * This is the old version of TimestampType, but has been replaced as it wasn't comparing
pre-epoch timestamps
+ * correctly. This is kept for backward compatibility but shouldn't be used in new code.
+ */
+@Deprecated
 public class DateType extends AbstractType<Date>
 {
     private static final Logger logger = LoggerFactory.getLogger(DateType.class);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3ec7d8c0/src/java/org/apache/cassandra/db/marshal/TimeType.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/marshal/TimeType.java b/src/java/org/apache/cassandra/db/marshal/TimeType.java
index c241a38..86de574 100644
--- a/src/java/org/apache/cassandra/db/marshal/TimeType.java
+++ b/src/java/org/apache/cassandra/db/marshal/TimeType.java
@@ -52,12 +52,6 @@ public class TimeType extends AbstractType<Long>
     }
 
     @Override
-    public boolean isCompatibleWith(AbstractType<?> previous)
-    {
-        return super.isCompatibleWith(previous);
-    }
-
-    @Override
     public boolean isValueCompatibleWithInternal(AbstractType<?> otherType)
     {
         return this == otherType || otherType == LongType.instance;


Mime
View raw message