[ 
http://issues.apache.org/jira/browse/IBATISNET-52?page=comments#action_64942 ]
     
Ron Grabowski commented on IBATISNET-52:
----------------------------------------

As of 5/10/2005, IBatisNet.DataAccess.Scope.ErrorContext has the same issue and 
needs fixed.

> IBatisNet.DataMapper.Scope.ErrorContext.ToString() incorrectly tests for 
> unset _resource, _activity, _objectId, and _moreInfo members.
> --------------------------------------------------------------------------------------------------------------------------------------
>
>          Key: IBATISNET-52
>          URL: http://issues.apache.org/jira/browse/IBATISNET-52
>      Project: iBatis for .NET
>         Type: Bug
>  Environment: [assembly: AssemblyVersion("1.1.458")]
>     Reporter: Ron Grabowski
>     Assignee: Gilles Bayon
>     Priority: Trivial
>      Fix For: DataMapper 1.2

>
> As of 5/5/2005, the IBatisNet.DataMapper.Scope.ErrorContext class in SVN has 
> the following code for Reset():
>  public void Reset() 
>  {
>   _resource = string.Empty;
>   _activity = string.Empty;;
>   _objectId = string.Empty;;
>   _moreInfo = string.Empty;;
>  }
> When a call to ToString() is made:
>  public override string ToString() 
>  {
>  StringBuilder message = new StringBuilder();
>  /* snip */
>  // object
>  if (_objectId != null) 
>  {
>   message.Append("  \n- Check the ");
>   message.Append(_objectId);
>   message.Append(".");
>  }
> The test for _objectId will always be true becuase the 4 members are not 
> equal to null. The test for the 4 members should be:
>   if (_objectId != null && _objectId.Length > 0)
> An example of the incorrect output can be seen by looking at issue 
> IBATISNET-51. Specifically the line:
>  - Check the .]

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to