Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mcs/class/System.Web/System.Web.Configuration/WebConfigurationSettings.cs')
-rw-r--r--mcs/class/System.Web/System.Web.Configuration/WebConfigurationSettings.cs14
1 files changed, 6 insertions, 8 deletions
diff --git a/mcs/class/System.Web/System.Web.Configuration/WebConfigurationSettings.cs b/mcs/class/System.Web/System.Web.Configuration/WebConfigurationSettings.cs
index ee47037cbfa..e00c1921978 100644
--- a/mcs/class/System.Web/System.Web.Configuration/WebConfigurationSettings.cs
+++ b/mcs/class/System.Web/System.Web.Configuration/WebConfigurationSettings.cs
@@ -791,13 +791,16 @@ namespace System.Web.Configuration
void StoreLocation (string name, XmlTextReader reader)
{
+ if (locations == null) {
+ locations = new Hashtable ();
+ }
+
string path = null;
bool haveAllow = false;
bool allowOverride = true;
- string att = null;
while (reader.MoveToNextAttribute ()) {
- att = reader.Name;
+ string att = reader.Name;
if (att == "path") {
if (path != null)
@@ -827,13 +830,8 @@ namespace System.Web.Configuration
ThrowException ("Unrecognized attribute.", reader);
}
- if (att == null)
- return; // empty location tag
-
Location loc = new Location (this, path, allowOverride);
- if (locations == null)
- locations = new Hashtable ();
- else if (locations.ContainsKey (loc.Path))
+ if (locations.ContainsKey (loc.Path))
ThrowException ("Duplicated location path: " + loc.Path, reader);
reader.MoveToElement ();