Sfoglia il codice sorgente

2007-07-24 Nagappan A <[email protected]>

	* SqlString.cs: Fixed compilation warning.

	* SqlBytes.cs: Fixed compilation warning.

	* SqlChars.cs: Fixed compilation warning.


svn path=/trunk/mcs/; revision=82536
Nagappan Alagappan 18 anni fa
parent
commit
6332299173

+ 8 - 0
mcs/class/System.Data/System.Data.SqlTypes/ChangeLog

@@ -1,3 +1,11 @@
+2007-07-24  Nagappan A  <[email protected]>
+
+	* SqlString.cs: Fixed compilation warning.
+
+	* SqlBytes.cs: Fixed compilation warning.
+
+	* SqlChars.cs: Fixed compilation warning.
+
 2007-05-10  Adar Wesley <[email protected]>
 
 	* SqlBoolean.cs: fixed typo in method names GreaterThanOrEquals,

+ 1 - 1
mcs/class/System.Data/System.Data.SqlTypes/SqlBytes.cs

@@ -78,7 +78,7 @@ namespace System.Data.SqlTypes
 
 		public SqlBytes (SqlBinary value)
 		{
-			if (value == null) {
+			if (value.IsNull) {
 				notNull = false;
 				buffer = null;
 			}

+ 1 - 1
mcs/class/System.Data/System.Data.SqlTypes/SqlChars.cs

@@ -75,7 +75,7 @@ namespace System.Data.SqlTypes
 
 		public SqlChars (SqlString value)
 		{
-			if (value == null) {
+			if (value.IsNull) {
 				notNull = false;
 				buffer = null;
 			} else {

+ 2 - 5
mcs/class/System.Data/System.Data.SqlTypes/SqlString.cs

@@ -409,11 +409,8 @@ namespace System.Data.SqlTypes
 		{
 			 if (x.IsNull || y.IsNull)
                                 return SqlString.Null;
-
-			if (( x == null) || (y == null))
-                                return SqlString.Null;
-			
-			return new SqlString (x.Value + y.Value);
+			else
+				return new SqlString (x.Value + y.Value);
 		}
 
 		// Equality