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 18:04:36 UTC
svn commit: r1080948 -
/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/BatchingPreparedStatementManagerImpl.java
Author: mikedd
Date: Sat Mar 12 17:04:36 2011
New Revision: 1080948
URL: http://svn.apache.org/viewvc?rev=1080948&view=rev
Log:
OPENJPA-1958: handle index out of bounds condition.
Modified:
openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/BatchingPreparedStatementManagerImpl.java
Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/BatchingPreparedStatementManagerImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/BatchingPreparedStatementManagerImpl.java?rev=1080948&r1=1080947&r2=1080948&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/BatchingPreparedStatementManagerImpl.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/BatchingPreparedStatementManagerImpl.java Sat Mar 12 17:04:36 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);
}
}