Return-Path: Delivered-To: apmail-ibatis-dev-archive@www.apache.org Received: (qmail 84491 invoked from network); 16 Dec 2006 06:40:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Dec 2006 06:40:43 -0000 Received: (qmail 77236 invoked by uid 500); 16 Dec 2006 06:40:50 -0000 Delivered-To: apmail-ibatis-dev-archive@ibatis.apache.org Received: (qmail 77079 invoked by uid 500); 16 Dec 2006 06:40:49 -0000 Mailing-List: contact dev-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ibatis.apache.org Delivered-To: mailing list dev@ibatis.apache.org Received: (qmail 77068 invoked by uid 99); 16 Dec 2006 06:40:49 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Dec 2006 22:40:49 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Dec 2006 22:40:41 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 0696D7140D2 for ; Fri, 15 Dec 2006 22:40:21 -0800 (PST) Message-ID: <23213993.1166251221004.JavaMail.jira@brutus> Date: Fri, 15 Dec 2006 22:40:21 -0800 (PST) From: "Jamison (JIRA)" To: dev@ibatis.apache.org Subject: [jira] Created: (IBATIS-377) iterate tag throws NullPointerException when assigned property is null/missing MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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