You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by mi...@apache.org on 2011/03/12 19:44:19 UTC
svn commit: r1080968 -
/openjpa/branches/2.1.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/BatchingPreparedStatementManagerImpl.java
Author: mikedd
Date: Sat Mar 12 18:44:19 2011
New Revision: 1080968
URL: http://svn.apache.org/viewvc?rev=1080968&view=rev
Log:
OPENJPA-1958: handle index out of bounds condition.
Modified:
openjpa/branches/2.1.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/BatchingPreparedStatementManagerImpl.java
Modified: openjpa/branches/2.1.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/BatchingPreparedStatementManagerImpl.java
URL: http://svn.apache.org/viewvc/openjpa/branches/2.1.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/BatchingPreparedStatementManagerImpl.java?rev=1080968&r1=1080967&r2=1080968&view=diff
==============================================================================
--- openjpa/branches/2.1.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/BatchingPreparedStatementManagerImpl.java (original)
+++ openjpa/branches/2.1.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/BatchingPreparedStatementManagerImpl.java Sat Mar 12 18:44:19 2011
@@ -214,6 +214,12 @@ public class BatchingPreparedStatementMa
throw SQLExceptions.getStore(se, ps, _dict);
}
else{
+ if(_batchedRows.size() == 0) {
+ if(_log.isTraceEnabled()) {
+ _log.trace("No batched rows found. The failed object may not be reliable");
+ }
+ throw SQLExceptions.getStore(se, ps, _dict);
+ }
throw SQLExceptions.getStore(se, ((RowImpl)(_batchedRows.get(index))).getFailedObject(), _dict);
}
}