2009-02-28 Marek Habersack <mhabersack@novell.com>
authorMarek Habersack <grendel@twistedcode.net>
Sat, 28 Feb 2009 02:15:28 +0000 (02:15 -0000)
committerMarek Habersack <grendel@twistedcode.net>
Sat, 28 Feb 2009 02:15:28 +0000 (02:15 -0000)
* WebConfigurationManager.cs: make sure no nrex happens in
GetSectionCacheKey ()

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

mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog
mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationManager.cs

index 4eb5d09958cd03b8d19415f13b8677fbc666c425..60b934e31b47a6d04e11c9da50b2d7fea6c2e8e0 100644 (file)
@@ -1,3 +1,8 @@
+2009-02-28  Marek Habersack  <mhabersack@novell.com>
+
+       * WebConfigurationManager.cs: make sure no nrex happens in
+       GetSectionCacheKey ()
+
 2009-02-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
 
        * WebConfigurationManager.cs: generate a hash from the string hsah
index ecc227a47b8ce3c758f6babf6ef9c5224a74642e..d6efcd995c40c42f7e135d83ce2ea3bc90f1ec92 100644 (file)
@@ -487,7 +487,7 @@ namespace System.Web.Configuration {
 
                static int GetSectionCacheKey (string sectionName, string path)
                {
-                       return sectionName.GetHashCode () ^ (path.GetHashCode () + 37);
+                       return (sectionName != null ? sectionName.GetHashCode () : 0) ^ ((path != null ? path.GetHashCode () : 0) + 37);
                }