mirror of
https://github.com/moparisthebest/k-9
synced 2025-01-30 14:50:14 -05:00
replaced for with for-each loop and optimized List implementation
This commit is contained in:
parent
1202f5109a
commit
1bc3271de3
@ -619,9 +619,9 @@ public class Account implements BaseAccount {
|
||||
|
||||
public static List<Integer> getExistingAccountNumbers(Preferences preferences) {
|
||||
Account[] accounts = preferences.getAccounts();
|
||||
List<Integer> accountNumbers = new LinkedList<Integer>();
|
||||
for (int i = 0; i < accounts.length; i++) {
|
||||
accountNumbers.add(accounts[i].getAccountNumber());
|
||||
List<Integer> accountNumbers = new ArrayList<Integer>(accounts.length);
|
||||
for (Account a : accounts) {
|
||||
accountNumbers.add(a.getAccountNumber());
|
||||
}
|
||||
return accountNumbers;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user