ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [30/33] ignite git commit: Fix bug
Date Mon, 02 Nov 2015 16:37:13 GMT
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 <ptupitsyn@gridgain.com>
Authored: Mon Nov 2 16:14:33 2015 +0300
Committer: Pavel Tupitsyn <ptupitsyn@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)


Mime
View raw message