Skip to content

Commit

Permalink
cleanup..
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Long committed Aug 16, 2011
1 parent 5621076 commit 0edec47
Showing 1 changed file with 4 additions and 2 deletions.
@@ -1,5 +1,6 @@
package org.springsource.examples.expenses.reports;

import java.util.Collection;
import java.util.HashSet;
import java.util.Set;

Expand Down Expand Up @@ -37,8 +38,9 @@ public Expense addExpense(Charge charge) {
}

public boolean validate() {
boolean valid = getExpenses().size() > 0;
for (Expense expense : getExpenses()) {
Collection<Expense> expenseCollection = getExpenses();
boolean valid = expenseCollection.size() > 0;
for (Expense expense : expenseCollection) {
if (!expenseValidationStrategy.validate(expense)) {
valid = false;
}
Expand Down

0 comments on commit 0edec47

Please sign in to comment.