ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject ignite git commit: IGNITE-1956: More sensible error message.
Date Wed, 25 Nov 2015 08:43:10 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-1956 462f8e618 -> fdb9d7321


IGNITE-1956: More sensible error message.


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

Branch: refs/heads/ignite-1956
Commit: fdb9d7321cb4cadde931965c02b9eaa63298feee
Parents: 462f8e6
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Wed Nov 25 11:44:00 2015 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Wed Nov 25 11:44:00 2015 +0300

----------------------------------------------------------------------
 .../apache/ignite/internal/portable/PortableUtils.java    | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/fdb9d732/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableUtils.java
b/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableUtils.java
index 0d79741..5b47cc7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableUtils.java
@@ -877,10 +877,12 @@ public class PortableUtils {
 
             // Check enum flag.
             if (oldMeta.isEnum() != newMeta.isEnum()) {
-                throw new BinaryObjectException(
-                    "Binary type has different enum flags [" + "typeName=" + newMeta.typeName()
+
-                        ", isEnum1=" + oldMeta.isEnum() + ", isEnum2=" + newMeta.isEnum()
+ ']'
-                );
+                if (oldMeta.isEnum())
+                    throw new BinaryObjectException("Binary type already registered as enum:
" +
+                        newMeta.typeName());
+                else
+                    throw new BinaryObjectException("Binary type already registered as non-enum:
" +
+                        newMeta.typeName());
             }
 
             // Check and merge fields.


Mime
View raw message