Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Safely remove cart items #752

Merged
merged 1 commit into from
Mar 5, 2025
Merged

Conversation

guikcd
Copy link
Contributor

@guikcd guikcd commented Mar 4, 2025

Closes: #751

The removeIf method handles the safe removal of elements, which in this case checks if the item ID matches the one we want to remove.
Without this, removing the last element result in ConcurrentModificationException.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@niallthomson niallthomson changed the title fix: safely remove cart items fix: Safely remove cart items Mar 5, 2025
@niallthomson
Copy link
Collaborator

Thanks @guikcd !

@niallthomson niallthomson merged commit c766bd3 into aws-containers:main Mar 5, 2025
7 checks passed
@guikcd guikcd deleted the cart_empty branch March 5, 2025 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error when emptying the cart
2 participants