瀏覽代碼

2008-05-26 Stephane Delcroix <[email protected]>

	* TimezoneInfo.cs: nullity check in HasSameRules (). Fixes bnc #391011

svn path=/trunk/mcs/; revision=104052
Stephane Delcroix 17 年之前
父節點
當前提交
1d67f58cf0
共有 2 個文件被更改,包括 10 次插入0 次删除
  1. 4 0
      mcs/class/System.Core/System/ChangeLog
  2. 6 0
      mcs/class/System.Core/System/TimeZoneInfo.cs

+ 4 - 0
mcs/class/System.Core/System/ChangeLog

@@ -1,3 +1,7 @@
+2008-05-26  Stephane Delcroix  <[email protected]>
+
+	* TimezoneInfo.cs: nullity check in HasSameRules (). Fixes bnc #391011
+
 2008-04-13  Jb Evain  <[email protected]>
 
 	* Func.cs: remove old ugly 2.1 hack.

+ 6 - 0
mcs/class/System.Core/System/TimeZoneInfo.cs

@@ -406,6 +406,12 @@ namespace System
 			if (other == null)
 				throw new ArgumentNullException ("other");
 
+			if ((this.adjustmentRules == null) != (other.adjustmentRules == null))
+				return false;
+
+			if (this.adjustmentRules == null)
+      				return true;
+
 			if (this.BaseUtcOffset != other.BaseUtcOffset)
 				return false;