openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mik...@apache.org
Subject svn commit: r1080968 - /openjpa/branches/2.1.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/BatchingPreparedStatementManagerImpl.java
Date Sat, 12 Mar 2011 18:44:19 GMT
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);
                   }                    
                 }



Mime
View raw message