mounilsankar / pe

0 stars 0 forks source link

App fails to run with null json object in the letsgethired.json file #2

Open mounilsankar opened 7 months ago

mounilsankar commented 7 months ago

The app crashes with a nullpointer exception when the letsgethired.json file has a null value as a json object. Why is this a problem? User guide says "Q: How do I transfer my data to another Computer? A: Install LetsGetHired in the other computer and overwrite the empty data file it creates with the file that contains the data from your previous LetsGetHired home folder." Therefore app should handle any invalid values in the json file. Steps to reproduce:

  1. Open up letsgethired.json file
  2. Add a null json object (refer to screenshot below) Screenshot 2023-11-17 at 4.13.56 PM.png
  3. cd to folder with the jar file for the application
  4. run the jar file
  5. App fails with error as shown below Screenshot 2023-11-17 at 4.12.08 PM.png

Possible fix: Catch the null pointer exception when reading data from the json file and start app with an empty data file as is the support provided in AB3

nus-se-script commented 7 months ago

Team's Response

We accept this bug.

However, we consider this bug to be severity Low as

  1. It only occurs in the rare case for advanced users who edit the data file and add this invalid null to the array.
  2. It only causes a minor inconvenience, where the user can delete the null from the array and the app will be back to functioning normally.

    Items for the Tester to Verify

    :question: Issue severity

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

Reason for disagreement: I think Users that edit the data file is not uncommon given many people may want to transfer the datafile across computers. This bug also renders the app unusable to a group of people who encounter this bug as they wouldn't know how to solve this issue. Hence this should be of medium severity.

"It only causes a minor inconvenience, where the user can delete the null from the array and the app will be back to functioning normally." you mention the above but mos people who encounter this issue would not know how to do the above given the context of your app being undergraduate uni students.