You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Ted Husted (JIRA)" <ib...@incubator.apache.org> on 2006/06/21 20:12:29 UTC
[jira] Created: (IBATISNET-163) Missing datatype can throw null
pointer exception
Missing datatype can throw null pointer exception
-------------------------------------------------
Key: IBATISNET-163
URL: http://issues.apache.org/jira/browse/IBATISNET-163
Project: iBatis for .NET
Type: Bug
Components: DataMapper
Versions: DataMapper 1.5
Reporter: Ted Husted
When using a numeric type that does not match a registred type, it's possible for the * to remain null. Then, at ResultProperty line 398 (build #412814, et seq.), the _typeHandler can be called directly
* value = _typeHandler.GetValueByIndex(this, dataReader);
This causes a deep null pointer exception that is difficult to trace.
We should patch this with a null guard that throws an exception with a meaningful message, like "Handler for DataType not registered." Something to considerr would be to attach the exception message to the TypeHandler property., and then use the property rather than the private field.
-Ted.
--
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
[jira] Closed: (IBATISNET-163) Missing datatype can throw null
pointer exception
Posted by "Gilles Bayon (JIRA)" <ib...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/IBATISNET-163?page=all ]
Gilles Bayon closed IBATISNET-163:
----------------------------------
Fix Version: DataMapper 1.5
Resolution: Fixed
in SVN
> Missing datatype can throw null pointer exception
> -------------------------------------------------
>
> Key: IBATISNET-163
> URL: http://issues.apache.org/jira/browse/IBATISNET-163
> Project: iBatis for .NET
> Type: Bug
> Components: DataMapper
> Versions: DataMapper 1.5
> Reporter: Ted Husted
> Fix For: DataMapper 1.5
>
> When using a numeric type that does not match a registred type, it's possible for the * to remain null. Then, at ResultProperty line 398 (build #412814, et seq.), the _typeHandler can be called directly
> * value = _typeHandler.GetValueByIndex(this, dataReader);
> This causes a deep null pointer exception that is difficult to trace.
> We should patch this with a null guard that throws an exception with a meaningful message, like "Handler for DataType not registered." Something to considerr would be to attach the exception message to the TypeHandler property., and then use the property rather than the private field.
> -Ted.
--
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