ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject ignite git commit: .NET - trying to fix
Date Thu, 13 Apr 2017 10:42:11 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-3477-debug be56ff643 -> 28467084c


.NET - trying to fix


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

Branch: refs/heads/ignite-3477-debug
Commit: 28467084c6562d51356f3c40a9969cad2b46f955
Parents: be56ff6
Author: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Authored: Thu Apr 13 13:42:42 2017 +0300
Committer: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Committed: Thu Apr 13 13:42:42 2017 +0300

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


http://git-wip-us.apache.org/repos/asf/ignite/blob/28467084/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 49a16cf..d6219b6 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
@@ -1464,23 +1464,30 @@ public class BinaryUtils {
             return new BinaryObjectOffheapImpl(ctx, in.offheapPointer() + pos, start, len);
         }
         else {
-            if (detach) {
-                int arrLen = in.readInt();
+//            if (detach) {
+//                int arrLen = in.readInt();
+//
+//                int objLen = length(in, in.position());
+//
+//                byte[] arr = in.readByteArray(objLen);
+//
+//                in.position(in.position() + (arrLen - objLen));
+//                int start = in.readInt();
+//
+//                return new BinaryObjectImpl(ctx, arr, start);
+//            }
+            byte[] arr = doReadByteArray(in);
+            int start = in.readInt();
 
-                int objLen = length(in, in.position());
-                byte[] arr = in.readByteArray(objLen);
+            BinaryObjectImpl binO = new BinaryObjectImpl(ctx, arr, start);
 
-                in.position(in.position() + (arrLen - objLen));
-                int start = in.readInt();
+            if (detach) {
+                binO.detachAllowed(true);
 
-                return new BinaryObjectImpl(ctx, arr, start);
+                return binO.detach();
             }
-            else {
-                byte[] arr = doReadByteArray(in);
-                int start = in.readInt();
 
-                return new BinaryObjectImpl(ctx, arr, start);
-            }
+            return binO;
         }
     }
 


Mime
View raw message