Hello,
I am trying to implement my own provider for xml site map files. Because of this I have started investigating the default Microsoft XmlSiteMapProvider via reflector and I have found a snippet that is confusing me, here it goes:
SiteMapNode node = this._siteMapNode;
if (node != null)
{
return node;
}
XmlDocument configDocument = this.GetConfigDocument();
lock (base._lock)
{
**if (this._siteMapNode == null)**
{...// more code
Okay, first we check whether the node is not null and then, when the check has passed we look it up once again. Isn't this If statement redundant? Or perhaps it has something to do with the lock ?