Skip to content

Commit

Permalink
Changed to more stable solution (instead of directly manipulating the…
Browse files Browse the repository at this point in the history
… list-object, we now use the removePlan-method)
  • Loading branch information
Aleksander1234519 committed Dec 3, 2024
1 parent 428948e commit 4b4675a
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,12 @@ public void run(Person person) {
}

// Remove all unselected plans because these are not handled
person.getPlans().removeIf(p -> p != person.getSelectedPlan());
List<Plan> plans = new ArrayList<>(person.getPlans());
for(Plan p : plans){
if (p != person.getSelectedPlan()){
person.removePlan(p);
}
}
}


Expand Down

0 comments on commit 4b4675a

Please sign in to comment.