Skip to content

Instantly share code, notes, and snippets.

@tehbeard
Created June 22, 2012 19:02
Show Gist options
  • Save tehbeard/2974537 to your computer and use it in GitHub Desktop.
Save tehbeard/2974537 to your computer and use it in GitHub Desktop.
for(PlayerStatBlob pb : writeCache.values()){
try {
prepSetPlayerStat.clearBatch();
for(PlayerStat ps : pb.getStats()){ //ConcurrentModificationException here
prepSetPlayerStat.setString(1, pb.getName());
prepSetPlayerStat.setString(2, ps.getCat());
prepSetPlayerStat.setString(3, ps.getName());
prepSetPlayerStat.setInt(4, ps.getValue());
prepSetPlayerStat.setInt(5, ps.getValue());
prepSetPlayerStat.addBatch();
}
prepSetPlayerStat.executeBatch();
BeardStat.printDebugCon("Saved.");
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment