OPENJPA-1958: handle index out of bounds condition.

git-svn-id: https://svn.apache.org/repos/asf/openjpa/branches/2.1.x@1080968 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Dick 2011-03-12 18:44:19 +00:00
parent 0349de9779
commit d111051525
1 changed files with 6 additions and 0 deletions

View File

@ -214,6 +214,12 @@ public class BatchingPreparedStatementManagerImpl extends
throw SQLExceptions.getStore(se, ps, _dict); throw SQLExceptions.getStore(se, ps, _dict);
} }
else{ 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); throw SQLExceptions.getStore(se, ((RowImpl)(_batchedRows.get(index))).getFailedObject(), _dict);
} }
} }