Skip to content

Commit

Permalink
Merge pull request flaptor#13 from clamprecht/master
Browse files Browse the repository at this point in the history
Fixing IndexOutOfBoundsException
  • Loading branch information
iperez committed Jan 17, 2012
2 parents a6494e3 + 8dae896 commit 1251503
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -857,10 +857,11 @@ public BatchResults addDocuments(Iterable<Document> documents)
Boolean added = (Boolean) result.get("added");

addeds.add(i, added);
errors.add(i, null); // populate every index position to avoid IndexOutOfBoundsException below

if (!added) {
hasErrors = true;
errors.add(i, (String) result.get("error"));
errors.set(i, (String) result.get("error"));
}
}

Expand Down

0 comments on commit 1251503

Please sign in to comment.