Skip to content

Adding Negative Integer and Integer Overflow Detection in ShoppingRecordController#23

Open
1phan wants to merge 2 commits into
IcedSoul:masterfrom
1phan:code_fix
Open

Adding Negative Integer and Integer Overflow Detection in ShoppingRecordController#23
1phan wants to merge 2 commits into
IcedSoul:masterfrom
1phan:code_fix

Conversation

@1phan
Copy link
Copy Markdown

@1phan 1phan commented Nov 19, 2023

This pull request introduces additional checks in the order processing logic to enhance the robustness and reliability of the application.

  1. counts > 0
  2. Check and make sure that int overflow will not occur in this line: shoppingRecord.setProductPrice(product.getPrice() * counts)
  3. Add alert for detected invalid input.

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.

1 participant