ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Kierstead <br...@fluidmedia.com>
Subject Re: Error in IBatisNet.DataAccess.Configuration.DomDaoManagerBuilder.ParseGlobalProperties
Date Tue, 18 Oct 2005 17:39:07 GMT

I've worked around it by adding a settings line to the config file which 
points to an empty file.

Brian


Brian Kierstead wrote:

> Hello,
>
> I think I've noticed an error in 
> IBatisNet.DataAccess.Configuration.DomDaoManagerBuilder.ParseGlobalProperties: 
>
>
> <snip>
>    XmlNode nodeProperties = 
> configurationScope.NodeContext.SelectSingleNode("properties");
>
>            configurationScope.ErrorContext.Resource = 
> nodeProperties.InnerXml.ToString();
>            configurationScope.ErrorContext.MoreInfo = "add global 
> properties";
>
>            if (nodeProperties != null)
>            {
> </snip>
>
> In the above code, if no 'properties' node is found, nodeProperties 
> will be null and trying to access its InnerXml property will throw a 
> System.NullReferenceException execption.  Should the test for null be 
> before this line?  As far as I can tell from xsd, the properties node 
> is not required.
>
> I'm not sure if this is the right place for this post, but I figure 
> there must be people on this list who know what to do with it if I'm 
> right.
>
> Brian
>



Mime
View raw message