You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ak...@apache.org on 2015/11/02 17:37:13 UTC

[30/33] ignite git commit: Fix bug

Fix bug


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

Branch: refs/heads/ignite-1753-1282
Commit: a96af3c4526e7cea60a5b8f7fdb1d093b36d5456
Parents: 9f4739b
Author: Pavel Tupitsyn <pt...@gridgain.com>
Authored: Mon Nov 2 16:14:33 2015 +0300
Committer: Pavel Tupitsyn <pt...@gridgain.com>
Committed: Mon Nov 2 16:14:33 2015 +0300

----------------------------------------------------------------------
 .../Apache.Ignite.Core/Impl/Portable/PortableWriterImpl.cs      | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/a96af3c4/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableWriterImpl.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableWriterImpl.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableWriterImpl.cs
index a4ddc51..069555f 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableWriterImpl.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableWriterImpl.cs
@@ -1084,10 +1084,13 @@ namespace Apache.Ignite.Core.Impl.Portable
                 desc.Serializer.WritePortable(obj, this);
 
                 // Write schema
+                var schemaOffset = _stream.Position - pos;
+
                 int schemaId;
                 var hasSchema = PortableObjectSchemaHolder.Current.WriteAndPop(_stream, out schemaId);
 
-                var schemaOffset = hasSchema ? _stream.Position - pos : PortableObjectHeader.Size;
+                if (!hasSchema)
+                    schemaOffset = PortableObjectHeader.Size;
 
                 // Calculate and write header.
                 if (hasSchema && _curRawPos > 0)