ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [4/5] ignite git commit: ignite-1353: reverted changes related to the registration of maps and collections in portable context
Date Thu, 03 Sep 2015 10:54:32 GMT
ignite-1353: reverted changes related to the registration of maps and collections in portable
context


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

Branch: refs/heads/ignite-1353
Commit: 3bbd23804aa641181d51e28e80d97ad31743f18b
Parents: e77e1c7
Author: Denis Magda <dmagda@gridgain.com>
Authored: Thu Sep 3 13:52:05 2015 +0300
Committer: Denis Magda <dmagda@gridgain.com>
Committed: Thu Sep 3 13:52:05 2015 +0300

----------------------------------------------------------------------
 .../internal/portable/PortableContext.java      | 24 ++++++++++----------
 .../GridPortableMarshallerSelfTest.java         |  5 ++++
 2 files changed, 17 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/3bbd2380/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
b/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
index 24c39b7..326d187 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
@@ -218,18 +218,18 @@ public class PortableContext implements Externalizable {
         registerPredefinedType(Date[].class, GridPortableMarshaller.DATE_ARR);
         registerPredefinedType(Object[].class, GridPortableMarshaller.OBJ_ARR);
 
-        registerPredefinedType(ArrayList.class, GridPortableMarshaller.ARR_LIST);
-        registerPredefinedType(LinkedList.class, GridPortableMarshaller.LINKED_LIST);
-        registerPredefinedType(HashSet.class, GridPortableMarshaller.HASH_SET);
-        registerPredefinedType(LinkedHashSet.class, GridPortableMarshaller.LINKED_HASH_SET);
-        registerPredefinedType(TreeSet.class, GridPortableMarshaller.TREE_SET);
-        registerPredefinedType(ConcurrentSkipListSet.class, GridPortableMarshaller.CONC_SKIP_LIST_SET);
-
-        registerPredefinedType(HashMap.class, GridPortableMarshaller.HASH_MAP);
-        registerPredefinedType(LinkedHashMap.class, GridPortableMarshaller.LINKED_HASH_MAP);
-        registerPredefinedType(TreeMap.class, GridPortableMarshaller.TREE_MAP);
-        registerPredefinedType(ConcurrentHashMap.class, GridPortableMarshaller.CONC_HASH_MAP);
-        registerPredefinedType(ConcurrentHashMap8.class, GridPortableMarshaller.CONC_HASH_MAP);
+        registerPredefinedType(ArrayList.class, 0);
+        registerPredefinedType(LinkedList.class, 0);
+        registerPredefinedType(HashSet.class, 0);
+        registerPredefinedType(LinkedHashSet.class, 0);
+        registerPredefinedType(TreeSet.class, 0);
+        registerPredefinedType(ConcurrentSkipListSet.class, 0);
+
+        registerPredefinedType(HashMap.class, 0);
+        registerPredefinedType(LinkedHashMap.class, 0);
+        registerPredefinedType(TreeMap.class, 0);
+        registerPredefinedType(ConcurrentHashMap.class, 0);
+        registerPredefinedType(ConcurrentHashMap8.class, 0);
 
         registerPredefinedType(GridMapEntry.class, 60);
         registerPredefinedType(IgniteBiTuple.class, 61);

http://git-wip-us.apache.org/repos/asf/ignite/blob/3bbd2380/modules/core/src/test/java/org/apache/ignite/internal/portable/GridPortableMarshallerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/portable/GridPortableMarshallerSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/portable/GridPortableMarshallerSelfTest.java
index 332a605..4545a58 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/portable/GridPortableMarshallerSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/portable/GridPortableMarshallerSelfTest.java
@@ -2258,6 +2258,11 @@ public class GridPortableMarshallerSelfTest extends GridCommonAbstractTest
{
         assertTrue(map.size() > 0);
 
         for (Map.Entry<String, Integer> entry : map.entrySet()) {
+            int id = entry.getValue();
+
+            if (id == GridPortableMarshaller.UNREGISTERED_TYPE_ID)
+                continue;
+
             PortableClassDescriptor desc = pCtx.descriptorForTypeId(false, entry.getValue(),
null);
 
             assertEquals(desc.typeId(), pCtx.typeId(desc.describedClass().getName()));


Mime
View raw message