LouisLouis19 / pe

0 stars 0 forks source link

Not filtering empty string in file #4

Open LouisLouis19 opened 3 years ago

LouisLouis19 commented 3 years ago

When I changed the food name burger into an empty string in the file, the values in the file is never filtered. Causing an exception to be thrown and program unable to start Screenshot 2021-11-12 at 4.26.53 PM.png

nus-se-bot commented 3 years ago

Team's Response

Thank you for this bug. Unfortunately, we couldn't replicate the issue that you faced.

image.png

In the image above, we've input multiple empty strings into savedItem.txt which are all accepted successfully without exceptions. Hence, this bug cannot be reproduced.

Items for the Tester to Verify

:question: Issue response

Team chose [response.CannotReproduce]

Reason for disagreement: Thank you for the response! However, I believe that the steps are not replicated properly. As described in the issue description, the bug which crashes the program occurs when the food name input in the text file is an empty string.

According to: https://docs.oracle.com/javaee/7/tutorial/bean-validation002.htm

An empty string is a string instance of zero length. The input provided in the replication attempt was inserting whitespace(s) instead of an empty string.

This is what the text file looks like given an empty string as its food name, followed by the error it follows at the start of the program. As it can be replicated using the proper steps, I disagree with the developers' response that this bug cannot be reproduced.

Screenshot 2021-11-18 at 12.36.25 AM.png

Screenshot 2021-11-18 at 12.37.01 AM.png


:question: Issue severity

Team chose [severity.Low] Originally [severity.Medium]

Reason for disagreement: Thank you for the response! The files are for users to edit (Hence, why it is human editable). Stating a warning in the user guide not to tamper with files is still not an excuse for developers not to catch and filter any file-related errors, ie. data corruption.

This was further emphasized in detail by the prof in this issue: https://github.com/nus-cs2113-AY2122S1/forum/issues/144

I decided to mark this bug with medium severity as it prevented users from starting the program at all and no filter was implemented for the corrupted data. Hence, causing a major inconvenience to users.