You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Gilles Bayon (JIRA)" <ib...@incubator.apache.org> on 2005/05/05 20:53:07 UTC
[jira] Closed: (IBATISNET-52) IBatisNet.DataMapper.Scope.ErrorContext.ToString() incorrectly tests for unset _resource, _activity, _objectId, and _moreInfo members.
[ http://issues.apache.org/jira/browse/IBATISNET-52?page=all ]
Gilles Bayon closed IBATISNET-52:
---------------------------------
Resolution: Fixed
Fix Version: DataMapper 1.2
In SVN
> 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