You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2015/06/01 11:46:08 UTC

incubator-ignite git commit: # GG-10054 fix dup type id

Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-gg-10054 9a83c8974 -> f15b1b0e9


# GG-10054 fix dup type id


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

Branch: refs/heads/ignite-gg-10054
Commit: f15b1b0e9d3e8e21880d6d334ce1716761630998
Parents: 9a83c89
Author: ptupitsyn <pt...@gridgain.com>
Authored: Mon Jun 1 12:45:56 2015 +0300
Committer: ptupitsyn <pt...@gridgain.com>
Committed: Mon Jun 1 12:45:56 2015 +0300

----------------------------------------------------------------------
 .../org/apache/ignite/internal/MarshallerContextAdapter.java   | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f15b1b0e/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextAdapter.java
index 8386675..ea006fb 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextAdapter.java
@@ -82,9 +82,11 @@ public abstract class MarshallerContextAdapter implements MarshallerContext {
 
                 String oldClsName;
 
-                if ((oldClsName = map.put(typeId, clsName)) != null)
-                    throw new IgniteException("Duplicate type ID [id=" + typeId + ", clsName=" + clsName +
+                if ((oldClsName = map.put(typeId, clsName)) != null) {
+                    if (!oldClsName.equals(clsName))
+                        throw new IgniteException("Duplicate type ID [id=" + typeId + ", clsName=" + clsName +
                         ", oldClsName=" + oldClsName + ']');
+                }
 
                 registeredTypes.add(clsName);
             }