You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Jamison (JIRA)" <ib...@incubator.apache.org> on 2006/12/16 07:40:21 UTC
[jira] Created: (IBATIS-377) iterate tag throws
NullPointerException when assigned property is null/missing
iterate tag throws NullPointerException when assigned property is null/missing
------------------------------------------------------------------------------
Key: IBATIS-377
URL: http://issues.apache.org/jira/browse/IBATIS-377
Project: iBatis for Java
Issue Type: Bug
Components: SQL Maps
Affects Versions: 2.1.7
Environment: N/A
Reporter: Jamison
Priority: Minor
When using the iterate tag in a statement if the property assigned is null the following exception is thrown:
Caused by: java.lang.NullPointerException
at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:188)
at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForList(GeneralStatement.java:123)
I believe that this condition should be detected and a specific exception should be thrown. This would allow users to detect the specifc condition that is causing the problem, a generic NullPointerException is not ideal for that. I would also suggest that null might be treated as an empty collection but I would be afraid that it might break backward compatibility for some people.
--
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