OPENJPA-1550: When batchLimit=-1 or >1 and an exception is caused, the params and failedObject are missing from the resultant exception.

avoid NullPointerException for JDBC provider using PureQUery APIs.

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@922355 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Catalina Wei 2010-03-12 17:17:23 +00:00
parent 36b9628948
commit 6503eabef5
1 changed files with 3 additions and 2 deletions

View File

@ -224,9 +224,10 @@ public class BatchingPreparedStatementManagerImpl extends
} finally { } finally {
_batchedSql = null; _batchedSql = null;
batchedRows.clear(); batchedRows.clear();
//Clear the Params now....should this be done above?
ps.clearParameters();
if (ps != null) { if (ps != null) {
//Clear the Params now....should this be done above? No.
//if JDBC provider using PureQuery, ps is null
ps.clearParameters();
try { try {
ps.close(); ps.close();
} catch (SQLException sqex) { } catch (SQLException sqex) {