2005-01-19 Sebastien Pouliot <sebastien@ximian.com>
authorSebastien Pouliot <sebastien@ximian.com>
Wed, 19 Jan 2005 13:36:56 +0000 (13:36 -0000)
committerSebastien Pouliot <sebastien@ximian.com>
Wed, 19 Jan 2005 13:36:56 +0000 (13:36 -0000)
* AspNetHostingPermission.cs: Fixed Intersect(null) which has a
different behaviour in NET_1_1 (return copy of self) than in NET_2_0
(return null).

svn path=/trunk/mcs/; revision=39154

mcs/class/System/System.Web/AspNetHostingPermission.cs
mcs/class/System/System.Web/ChangeLog

index 74bfbd8854bdaad6d8d09e25dbed6a953ed72375..482787bf289795b6bbf7789f15ba65249edfea30 100644 (file)
@@ -115,8 +115,13 @@ namespace System.Web {
                public override IPermission Intersect (IPermission target)
                {
                        AspNetHostingPermission anhp = Cast (target);
-                       if (anhp == null)
+                       if (anhp == null) {
+#if NET_2_0
                                return null;
+#else
+                               return new AspNetHostingPermission (_level);
+#endif
+                       }
 
                        return new AspNetHostingPermission ((_level <= anhp.Level) ? _level : anhp.Level);
                }
index f9816bf7646e64bc3b80d47e42864f2e2be7a616..690cfd60fd5a16a03cebe23c200f8f5cbd08393f 100644 (file)
@@ -1,3 +1,9 @@
+2005-01-19  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * AspNetHostingPermission.cs: Fixed Intersect(null) which has a 
+       different behaviour in NET_1_1 (return copy of self) than in NET_2_0
+       (return null).
+
 2004-09-10  Sebastien Pouliot  <sebastien@ximian.com>
 
        * AspNetHostingPermission.cs: Completed TODO.