ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [2/3] ignite git commit: Fixed failure in BinaryObjectBuilderSelfTest.testCopyFromInnerObject.
Date Mon, 14 Dec 2015 07:07:47 GMT
Fixed failure in BinaryObjectBuilderSelfTest.testCopyFromInnerObject.


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

Branch: refs/heads/ignite-1.5
Commit: 4ae6292cface325f21237db5d18ce77dee380072
Parents: 6d96bb6
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Mon Dec 14 10:08:29 2015 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Mon Dec 14 10:08:29 2015 +0300

----------------------------------------------------------------------
 .../ignite/internal/binary/BinaryUtils.java      | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/4ae6292c/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryUtils.java
b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryUtils.java
index 8b5ec68..9e5260b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryUtils.java
@@ -836,13 +836,18 @@ public class BinaryUtils {
 
                 if (oldFieldType == null)
                     changed = true;
-                else if (!F.eq(oldFieldType, newField.getValue())) {
-                    throw new BinaryObjectException(
-                        "Binary type has different field types [" + "typeName=" + oldMeta.typeName()
+
-                            ", fieldName=" + newField.getKey() +
-                            ", fieldTypeName1=" + fieldTypeName(oldFieldType) +
-                            ", fieldTypeName2=" + fieldTypeName(newField.getValue()) + ']'
-                    );
+                else {
+                    String oldFieldTypeName = fieldTypeName(oldFieldType);
+                    String newFieldTypeName = fieldTypeName(newField.getValue());
+
+                    if (!F.eq(oldFieldTypeName, newFieldTypeName)) {
+                        throw new BinaryObjectException(
+                            "Binary type has different field types [" + "typeName=" + oldMeta.typeName()
+
+                                ", fieldName=" + newField.getKey() +
+                                ", fieldTypeName1=" + oldFieldTypeName +
+                                ", fieldTypeName2=" + newFieldTypeName + ']'
+                        );
+                    }
                 }
             }
 


Mime
View raw message