From d18cc0845606c32e01e044ae5411c7053b1c73ec Mon Sep 17 00:00:00 2001 From: Jon Skeet Date: Thu, 30 Jul 2015 13:50:02 +0100 Subject: Generated code for previous commit. --- .../TestProtos/UnittestProto3.cs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'csharp/src/Google.Protobuf.Test') diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestProto3.cs b/csharp/src/Google.Protobuf.Test/TestProtos/UnittestProto3.cs index 1f2e9229..e360ac15 100644 --- a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestProto3.cs +++ b/csharp/src/Google.Protobuf.Test/TestProtos/UnittestProto3.cs @@ -426,7 +426,7 @@ namespace Google.Protobuf.TestProtos { public string SingleString { get { return singleString_; } set { - singleString_ = value ?? ""; + singleString_ = pb::Preconditions.CheckNotNull(value, "value"); } } @@ -435,7 +435,7 @@ namespace Google.Protobuf.TestProtos { public pb::ByteString SingleBytes { get { return singleBytes_; } set { - singleBytes_ = value ?? pb::ByteString.Empty; + singleBytes_ = pb::Preconditions.CheckNotNull(value, "value"); } } @@ -700,7 +700,7 @@ namespace Google.Protobuf.TestProtos { public string OneofString { get { return oneofFieldCase_ == OneofFieldOneofCase.OneofString ? (string) oneofField_ : ""; } set { - oneofField_ = value ?? ""; + oneofField_ = pb::Preconditions.CheckNotNull(value, "value"); oneofFieldCase_ = OneofFieldOneofCase.OneofString; } } @@ -709,7 +709,7 @@ namespace Google.Protobuf.TestProtos { public pb::ByteString OneofBytes { get { return oneofFieldCase_ == OneofFieldOneofCase.OneofBytes ? (pb::ByteString) oneofField_ : pb::ByteString.Empty; } set { - oneofField_ = value ?? pb::ByteString.Empty; + oneofField_ = pb::Preconditions.CheckNotNull(value, "value"); oneofFieldCase_ = OneofFieldOneofCase.OneofBytes; } } @@ -2703,7 +2703,7 @@ namespace Google.Protobuf.TestProtos { public string StringField { get { return stringField_; } set { - stringField_ = value ?? ""; + stringField_ = pb::Preconditions.CheckNotNull(value, "value"); } } @@ -2954,7 +2954,7 @@ namespace Google.Protobuf.TestProtos { public string MyString { get { return myString_; } set { - myString_ = value ?? ""; + myString_ = pb::Preconditions.CheckNotNull(value, "value"); } } @@ -3385,7 +3385,7 @@ namespace Google.Protobuf.TestProtos { public string Data { get { return data_; } set { - data_ = value ?? ""; + data_ = pb::Preconditions.CheckNotNull(value, "value"); } } @@ -3589,7 +3589,7 @@ namespace Google.Protobuf.TestProtos { public pb::ByteString Data { get { return data_; } set { - data_ = value ?? pb::ByteString.Empty; + data_ = pb::Preconditions.CheckNotNull(value, "value"); } } @@ -3695,7 +3695,7 @@ namespace Google.Protobuf.TestProtos { public pb::ByteString Data { get { return data_; } set { - data_ = value ?? pb::ByteString.Empty; + data_ = pb::Preconditions.CheckNotNull(value, "value"); } } @@ -4350,7 +4350,7 @@ namespace Google.Protobuf.TestProtos { public string FooString { get { return fooCase_ == FooOneofCase.FooString ? (string) foo_ : ""; } set { - foo_ = value ?? ""; + foo_ = pb::Preconditions.CheckNotNull(value, "value"); fooCase_ = FooOneofCase.FooString; } } @@ -5409,7 +5409,7 @@ namespace Google.Protobuf.TestProtos { public string A { get { return a_; } set { - a_ = value ?? ""; + a_ = pb::Preconditions.CheckNotNull(value, "value"); } } -- cgit v1.2.3