tiny simplifications regarding usage of Iterator
This commit is contained in:
committed by
Juergen Hoeller
parent
8f972a5a60
commit
4cc7b9b9fc
@@ -21,7 +21,6 @@ import java.sql.SQLException;
|
||||
import java.util.ArrayDeque;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Deque;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import javax.sql.DataSource;
|
||||
|
||||
@@ -230,9 +229,8 @@ public class BatchSqlUpdate extends SqlUpdate {
|
||||
*/
|
||||
public int[] getRowsAffected() {
|
||||
int[] result = new int[this.rowsAffected.size()];
|
||||
int i = 0;
|
||||
for (Iterator<Integer> it = this.rowsAffected.iterator(); it.hasNext(); i++) {
|
||||
result[i] = it.next();
|
||||
for (int i = 0; i < this.rowsAffected.size(); i++) {
|
||||
result[i] = this.rowsAffected.get(i);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user