ibatis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jamison (JIRA)" <ibatis-...@incubator.apache.org>
Subject [jira] Created: (IBATIS-377) iterate tag throws NullPointerException when assigned property is null/missing
Date Sat, 16 Dec 2006 06:40:21 GMT
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


View raw message