ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [06/10] ignite git commit: Merge branch 'ignite-1770' into ignite-1770-debug
Date Mon, 26 Oct 2015 15:12:04 GMT
Merge branch 'ignite-1770' into ignite-1770-debug

Conflicts:
	modules/core/src/main/java/org/apache/ignite/internal/portable/builder/PortableBuilderImpl.java


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

Branch: refs/heads/ignite-1770
Commit: 85d4985720ce450beb0e43876985bb7c13e1b540
Parents: 077d231 c5c6178
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Mon Oct 26 17:42:09 2015 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Mon Oct 26 17:42:09 2015 +0300

----------------------------------------------------------------------
 .../portable/builder/PortableBuilderImpl.java   | 30 +++++---------------
 1 file changed, 7 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/85d49857/modules/core/src/main/java/org/apache/ignite/internal/portable/builder/PortableBuilderImpl.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/portable/builder/PortableBuilderImpl.java
index 1005807,a910395..7dbfd49
--- a/modules/core/src/main/java/org/apache/ignite/internal/portable/builder/PortableBuilderImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/builder/PortableBuilderImpl.java
@@@ -226,25 -226,18 +226,17 @@@ public class PortableBuilderImpl implem
  
              reader.position(start + hdrLen);
  
-             int cpStart = -1;
- 
              while (reader.position() < rawOff) {
 -                int fldId = reader.readInt();
 -
 -                int len = reader.readInt();
 +                int fieldId = reader.readInt();
 +                int fieldLen = reader.readInt();
  
-                 if (assignedFldsById.containsKey(fieldId)) {
-                     if (cpStart >= 0) {
-                         writer.write(reader.array(), cpStart, reader.position() - 4 - 4
- cpStart);
- 
-                         cpStart = -1;
-                     }
- 
-                     Object assignedVal = assignedFldsById.remove(fieldId);
+                 if (assignedFldsById.containsKey(fldId)) {
+                     Object assignedVal = assignedFldsById.remove(fldId);
  
 -                    reader.skip(len);
 +                    reader.skip(fieldLen);
  
                      if (assignedVal != REMOVED_FIELD_MARKER) {
 -                        writer.writeInt(fldId);
 +                        writer.writeFieldId(fieldId);
  
                          int lenPos = writer.reserveAndMark(4);
  
@@@ -254,22 -247,17 +246,17 @@@
                      }
                  }
                  else {
 -                    int type = len != 0 ? reader.readByte(0) : 0;
 +                    int type = fieldLen != 0 ? reader.readByte(0) : 0;
  
-                     if (fieldLen != 0 && !PortableUtils.isPlainArrayType(type) &&
PortableUtils.isPlainType(type)) {
-                         if (cpStart < 0)
-                             cpStart = reader.position() - 4 - 4;
+                     if (len != 0 && !PortableUtils.isPlainArrayType(type) &&
PortableUtils.isPlainType(type)) {
 -                        writer.writeInt(fldId);
 -                        writer.writeInt(len);
++                        writer.writeInt(fieldId);
++                        writer.writeInt(fieldLen);
+                         writer.write(reader.array(), reader.position(), len);
  
 -                        reader.skip(len);
 +                        reader.skip(fieldLen);
                      }
                      else {
-                         if (cpStart >= 0) {
-                             writer.write(reader.array(), cpStart, reader.position() - 4
- cpStart);
- 
-                             cpStart = -1;
-                         }
-                         else
-                             writer.writeFieldId(fieldId);
+                         writer.writeInt(fldId);
  
                          Object val;
  


Mime
View raw message