ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [3/7] ignite git commit: IGNITE-4917: Fixed failure when accessing BinaryObjectBuilder field value serialized with OptimizedMarshaller . This closes #1736.
Date Fri, 14 Apr 2017 14:27:31 GMT
IGNITE-4917: Fixed failure when accessing BinaryObjectBuilder field value serialized with OptimizedMarshaller
. This closes #1736.

(cherry picked from commit b8e3d1b)


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

Branch: refs/heads/ignite-4932
Commit: 5fbbc37669bcf0557a98d8ab70c3dbb79ebcd340
Parents: 207ccaa
Author: Andrey V. Mashenkov <andrey.mashenkov@gmail.com>
Authored: Wed Apr 5 15:01:02 2017 +0300
Committer: dkarachentsev <dkarachentsev@gridgain.com>
Committed: Mon Apr 10 12:40:37 2017 +0300

----------------------------------------------------------------------
 .../ignite/internal/binary/builder/BinaryBuilderReader.java | 8 ++++++++
 .../internal/binary/mutabletest/GridBinaryTestClasses.java  | 9 +++++++++
 2 files changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/5fbbc376/modules/core/src/main/java/org/apache/ignite/internal/binary/builder/BinaryBuilderReader.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/builder/BinaryBuilderReader.java
b/modules/core/src/main/java/org/apache/ignite/internal/binary/builder/BinaryBuilderReader.java
index baaabd6..02264e3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/binary/builder/BinaryBuilderReader.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/builder/BinaryBuilderReader.java
@@ -476,6 +476,14 @@ public class BinaryBuilderReader implements BinaryPositionReadable {
                 return new BinaryPlainBinaryObject(binaryObj);
             }
 
+            case GridBinaryMarshaller.OPTM_MARSH: {
+                final BinaryHeapInputStream bin = BinaryHeapInputStream.create(arr, pos +
1);
+
+                final Object obj = BinaryUtils.doReadOptimized(bin, ctx, U.resolveClassLoader(ctx.configuration()));
+
+                return obj;
+            }
+
             default:
                 throw new BinaryObjectException("Invalid flag value: " + type);
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/5fbbc376/modules/core/src/test/java/org/apache/ignite/internal/binary/mutabletest/GridBinaryTestClasses.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/mutabletest/GridBinaryTestClasses.java
b/modules/core/src/test/java/org/apache/ignite/internal/binary/mutabletest/GridBinaryTestClasses.java
index 5ddb87dc..0d4de7f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/binary/mutabletest/GridBinaryTestClasses.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/mutabletest/GridBinaryTestClasses.java
@@ -24,6 +24,7 @@ import java.io.ObjectOutput;
 import java.io.ObjectOutputStream;
 import java.io.Serializable;
 import java.math.BigDecimal;
+import java.math.BigInteger;
 import java.sql.Timestamp;
 import java.util.ArrayList;
 import java.util.Date;
@@ -142,6 +143,9 @@ public class GridBinaryTestClasses {
         public Integer i_;
 
         /** */
+        public BigInteger bi_;
+
+        /** */
         public Long l_;
 
         /** */
@@ -151,6 +155,9 @@ public class GridBinaryTestClasses {
         public Double d_;
 
         /** */
+        public BigDecimal bd_;
+
+        /** */
         public Character c_;
 
         /** */
@@ -267,9 +274,11 @@ public class GridBinaryTestClasses {
             b_ = 11;
             s_ = 22;
             i_ = 33;
+            bi_ = new BigInteger("33000000000000");
             l_ = 44L;
             f_ = 55f;
             d_ = 66d;
+            bd_ = new BigDecimal("33000000000000.123456789");
             c_ = 'e';
             z_ = true;
 


Mime
View raw message