You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2015/09/03 13:13:50 UTC

[29/30] ignite git commit: ignite-1353: reverted changes related to the registration of maps and collections in portable context

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 <dm...@gridgain.com>
Authored: Thu Sep 3 13:52:05 2015 +0300
Committer: Denis Magda <dm...@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()));