Open wx-03 opened 2 weeks ago
We thank the bug reporter for bringing this to our attention.
[The team marked this bug as a duplicate of the following bug]
When data is edited from storage, negative number can be saved for calories
Steps to reproduce:
- Save a meal option with valid number of calories
- Exit the program
- Open the
data/meal_options.csv
file- Edit the calories to a negative number
- Run the program
- Execute
meal menu
commandExpected: Program should show that invalid entry is detected upon loading data Actual: Program loads invalid data
[original: nus-cs2113-AY2425S1/pe-interim#659] [original labels: severity.Low type.FunctionalityBug]
[This is the team's response to the above 'original' bug]
No details provided by team.
Items for the Tester to Verify
:question: Issue duplicate status
Team chose to mark this issue as a duplicate of another issue (as explained in the Team's response above)
Reason for disagreement: I disagree that this is a duplicate bug because the 'original' bug shows changing an integer to a negative one, while this bug shows changing an integer to a String. Fixing the 'original' bug (by checking that the number of calories is positive) does not solve this bug. In addition, changing an integer to a negative one does not cause any uncaught exceptions, but changing an integer to a String causes the program to crash due to the uncaught exception.
Steps to reproduce:
data/meal_options.csv
fileExpected: Program should handle the NumberFormatException thrown and show that the data has been corrupted Actual: Program does not handle the exception