Commit 07542e78 authored by Jan Tattermusch's avatar Jan Tattermusch

check already performed by MergeFrom

parent 0c874a6a
...@@ -64,7 +64,6 @@ namespace Google.Protobuf ...@@ -64,7 +64,6 @@ namespace Google.Protobuf
/// <returns>The newly parsed message.</returns> /// <returns>The newly parsed message.</returns>
public IMessage ParseFrom(byte[] data) public IMessage ParseFrom(byte[] data)
{ {
ProtoPreconditions.CheckNotNull(data, "data");
IMessage message = factory(); IMessage message = factory();
message.MergeFrom(data); message.MergeFrom(data);
return message; return message;
...@@ -79,7 +78,6 @@ namespace Google.Protobuf ...@@ -79,7 +78,6 @@ namespace Google.Protobuf
/// <returns>The newly parsed message.</returns> /// <returns>The newly parsed message.</returns>
public IMessage ParseFrom(byte[] data, int offset, int length) public IMessage ParseFrom(byte[] data, int offset, int length)
{ {
ProtoPreconditions.CheckNotNull(data, "data");
IMessage message = factory(); IMessage message = factory();
message.MergeFrom(data, offset, length); message.MergeFrom(data, offset, length);
return message; return message;
...@@ -92,7 +90,6 @@ namespace Google.Protobuf ...@@ -92,7 +90,6 @@ namespace Google.Protobuf
/// <returns>The parsed message.</returns> /// <returns>The parsed message.</returns>
public IMessage ParseFrom(ByteString data) public IMessage ParseFrom(ByteString data)
{ {
ProtoPreconditions.CheckNotNull(data, "data");
IMessage message = factory(); IMessage message = factory();
message.MergeFrom(data); message.MergeFrom(data);
return message; return message;
...@@ -206,7 +203,6 @@ namespace Google.Protobuf ...@@ -206,7 +203,6 @@ namespace Google.Protobuf
/// <returns>The newly parsed message.</returns> /// <returns>The newly parsed message.</returns>
public new T ParseFrom(byte[] data) public new T ParseFrom(byte[] data)
{ {
ProtoPreconditions.CheckNotNull(data, "data");
T message = factory(); T message = factory();
message.MergeFrom(data); message.MergeFrom(data);
return message; return message;
...@@ -219,7 +215,6 @@ namespace Google.Protobuf ...@@ -219,7 +215,6 @@ namespace Google.Protobuf
/// <returns>The parsed message.</returns> /// <returns>The parsed message.</returns>
public new T ParseFrom(ByteString data) public new T ParseFrom(ByteString data)
{ {
ProtoPreconditions.CheckNotNull(data, "data");
T message = factory(); T message = factory();
message.MergeFrom(data); message.MergeFrom(data);
return message; return message;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment