You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ibatis.apache.org by cb...@apache.org on 2005/12/18 16:34:06 UTC
svn commit: r357472 -
/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/execution/SqlExecutor.java
Author: cbegin
Date: Sun Dec 18 07:34:03 2005
New Revision: 357472
URL: http://svn.apache.org/viewcvs?rev=357472&view=rev
Log:
Fixed IBATIS-220 Null Pointer in SqlExecutor.handleResults where ResultSet is null.
Modified:
ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/execution/SqlExecutor.java
Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/execution/SqlExecutor.java
URL: http://svn.apache.org/viewcvs/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/execution/SqlExecutor.java?rev=357472&r1=357471&r2=357472&view=diff
==============================================================================
--- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/execution/SqlExecutor.java (original)
+++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/execution/SqlExecutor.java Sun Dec 18 07:34:03 2005
@@ -180,8 +180,10 @@
ps.execute();
rs = getFirstResultSet(ps);
- errorContext.setMoreInfo("Check the results (failed to retrieve results).");
- handleResults(request, rs, skipResults, maxResults, callback);
+ if (rs != null) {
+ errorContext.setMoreInfo("Check the results (failed to retrieve results).");
+ handleResults(request, rs, skipResults, maxResults, callback);
+ }
// clear out remaining results
while (ps.getMoreResults());
@@ -287,8 +289,10 @@
cs.execute();
rs = getFirstResultSet(cs);
- errorContext.setMoreInfo("Check the results (failed to retrieve results).");
- handleResults(request, rs, skipResults, maxResults, callback);
+ if (rs != null) {
+ errorContext.setMoreInfo("Check the results (failed to retrieve results).");
+ handleResults(request, rs, skipResults, maxResults, callback);
+ }
// consume additional results
while (cs.getMoreResults());