ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject [06/27] ignite git commit: IGNITE-4917: Fixed failure when accessing BinaryObjectBuilder field value serialized with OptimizedMarshaller . This closes #1736.
Date Wed, 31 May 2017 12:27:52 GMT
IGNITE-4917: Fixed failure when accessing BinaryObjectBuilder field value serialized with OptimizedMarshaller
. This closes #1736.


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

Branch: refs/heads/ignite-5232-1.7.2
Commit: 443ac9a7aa82af1359a03bcfc8f9212b108300e4
Parents: b7ab273
Author: Andrey V. Mashenkov <andrey.mashenkov@gmail.com>
Authored: Wed Apr 5 15:01:02 2017 +0300
Committer: Andrey V. Mashenkov <andrey.mashenkov@gmail.com>
Committed: Fri Apr 7 13:02:23 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/443ac9a7/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/443ac9a7/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