commit | c86b504409f0b1b57764fd42376de28b13968a8f | [log] [tgz] |
---|---|---|
author | csharptest <roger@csharptest.net> | Fri Sep 09 22:16:08 2011 -0500 |
committer | rogerk <devnull@localhost> | Fri Sep 09 22:16:08 2011 -0500 |
tree | 1d32b2165e6c4665390d2ec5bbe972ba25e7cd02 | |
parent | f52ec95ad50b352ed82449f9cbef48f6edd50149 [diff] |
Missing braces :)
diff --git a/src/ProtocolBuffers.Serialization/JsonFormatWriter.cs b/src/ProtocolBuffers.Serialization/JsonFormatWriter.cs index f387f39..15e08e0 100644 --- a/src/ProtocolBuffers.Serialization/JsonFormatWriter.cs +++ b/src/ProtocolBuffers.Serialization/JsonFormatWriter.cs
@@ -246,8 +246,10 @@ { if (disposing) { - while(_counter.Count > 1) + while (_counter.Count > 1) + { WriteMessageEnd(); + } } base.Dispose(disposing);
diff --git a/src/ProtocolBuffers.Serialization/XmlFormatWriter.cs b/src/ProtocolBuffers.Serialization/XmlFormatWriter.cs index 79f403d..3c5cb3a 100644 --- a/src/ProtocolBuffers.Serialization/XmlFormatWriter.cs +++ b/src/ProtocolBuffers.Serialization/XmlFormatWriter.cs
@@ -78,8 +78,10 @@ { if (disposing) { - while(_messageOpenCount > 0) + while (_messageOpenCount > 0) + { WriteMessageEnd(); + } _output.Close(); } @@ -163,7 +165,9 @@ public override void WriteMessageEnd() { if (_messageOpenCount <= 0) + { throw new InvalidOperationException(); + } _output.WriteEndElement(); _output.Flush();
diff --git a/src/ProtocolBuffers/CodedOutputStream.cs b/src/ProtocolBuffers/CodedOutputStream.cs index 560719a..37c6038 100644 --- a/src/ProtocolBuffers/CodedOutputStream.cs +++ b/src/ProtocolBuffers/CodedOutputStream.cs
@@ -131,7 +131,9 @@ if (output != null) { if (position > 0) + { Flush(); + } output.Dispose(); } }