nus-cs2113-AY1920S2 / pe-dev-response

0 stars 0 forks source link

When editing jobList.json, program threw null pointer exception #286

Open nus-pe-bot opened 4 years ago

nus-pe-bot commented 4 years ago

When editing the json files directly, inputting a invalid index crashes.

(After further testings, not only the index, but the fields of the json as well. For example "title", "text" etc.)

Steps to reproduce.

  1. Save some jobs into job list
  2. Exit program
  3. Open jobList.json with notepad
  4. change any index to a invalid index. (For example 1. to -10)

See below for more information.

image.png

image.png


[original: nus-cs2113-AY1920S2/pe-interim#282]

alaukiknpant commented 4 years ago

Team's Response

If you mess with any other data of the JSON file, then the appropriate exception is thrown. However, messing with the index and not any other aspects of the JSON file is a very specific exception that is unlikely to happen in the real world unless done with the undetstanding of how JSON files work and how they can be messed with. I have labelled the bug as a "flaw that is unlikely to affect normal operations of the product. Appears only in very rare situations" and hence with low priority.

It is a great catch nontheless.

Duplicate status (if any):

--