cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject git commit: improve use of generics
Date Thu, 04 Oct 2012 17:53:51 GMT
Updated Branches:
  refs/heads/trunk b07e53cfb -> d54a93f2d


improve use of generics


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

Branch: refs/heads/trunk
Commit: d54a93f2d4696e146ef7b58cf81c40a66443058d
Parents: b07e53c
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Thu Oct 4 12:53:19 2012 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Thu Oct 4 12:53:19 2012 -0500

----------------------------------------------------------------------
 .../org/apache/cassandra/db/marshal/ListType.java  |    4 ++--
 .../org/apache/cassandra/db/marshal/MapType.java   |    4 ++--
 .../org/apache/cassandra/db/marshal/SetType.java   |    6 +++---
 3 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d54a93f2/src/java/org/apache/cassandra/db/marshal/ListType.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/marshal/ListType.java b/src/java/org/apache/cassandra/db/marshal/ListType.java
index c7b6817..7ee5e79 100644
--- a/src/java/org/apache/cassandra/db/marshal/ListType.java
+++ b/src/java/org/apache/cassandra/db/marshal/ListType.java
@@ -45,10 +45,10 @@ public class ListType<T> extends CollectionType<List<T>>
 
     public static synchronized <T> ListType<T> getInstance(AbstractType<T>
elements)
     {
-        ListType t = instances.get(elements);
+        ListType<T> t = instances.get(elements);
         if (t == null)
         {
-            t = new ListType(elements);
+            t = new ListType<T>(elements);
             instances.put(elements, t);
         }
         return t;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d54a93f2/src/java/org/apache/cassandra/db/marshal/MapType.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/marshal/MapType.java b/src/java/org/apache/cassandra/db/marshal/MapType.java
index 54c130e..8e0b161 100644
--- a/src/java/org/apache/cassandra/db/marshal/MapType.java
+++ b/src/java/org/apache/cassandra/db/marshal/MapType.java
@@ -47,10 +47,10 @@ public class MapType<K, V> extends CollectionType<Map<K, V>>
     public static synchronized <K, V> MapType<K, V> getInstance(AbstractType<K>
keys, AbstractType<V> values)
     {
         Pair<AbstractType<?>, AbstractType<?>> p = Pair.<AbstractType<?>,
AbstractType<?>>create(keys, values);
-        MapType t = instances.get(p);
+        MapType<K, V> t = instances.get(p);
         if (t == null)
         {
-            t = new MapType(keys, values);
+            t = new MapType<K, V>(keys, values);
             instances.put(p, t);
         }
         return t;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d54a93f2/src/java/org/apache/cassandra/db/marshal/SetType.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/marshal/SetType.java b/src/java/org/apache/cassandra/db/marshal/SetType.java
index 45b6e54..724754f 100644
--- a/src/java/org/apache/cassandra/db/marshal/SetType.java
+++ b/src/java/org/apache/cassandra/db/marshal/SetType.java
@@ -43,12 +43,12 @@ public class SetType<T> extends CollectionType<Set<T>>
         return getInstance(l.get(0));
     }
 
-    public static synchronized <T> SetType getInstance(AbstractType<T> elements)
+    public static synchronized <T> SetType<T> getInstance(AbstractType<T>
elements)
     {
-        SetType t = instances.get(elements);
+        SetType<T> t = instances.get(elements);
         if (t == null)
         {
-            t = new SetType(elements);
+            t = new SetType<T>(elements);
             instances.put(elements, t);
         }
         return t;


Mime
View raw message