nus-cs2103-AY2324S1 / pe-dev-response

0 stars 0 forks source link

Storage does not handle all null cases and causes app to not launch #5420

Open nus-se-script opened 10 months ago

nus-se-script commented 10 months ago

Description

When there is null put into the tags section of the json file, the app does not launch.

Expected

App should launch but empty, to indicate that there is invalid data.

Actual

App does not even launch.

Steps to Reproduce

  1. Open data/addressbook.json and edit the tags to be as such:

image.png

  1. Launch JABPro using the terminal and notice that the app is not able to launch.  

[original: nus-cs2103-AY2324S1/pe-interim#5047] [original labels: type.FeatureFlaw severity.Medium]

sk2001git commented 10 months ago

Team's Response

Rejected based on the basis of extreme user behavior.

Firstly, the editing of the file welcome advanced users in order to manipulate the file directly. This would mean that a huge portion of users wont be manipulating the data file directly.

Secondly, due to the CLI aspect of the app, there is no way for a user to give a null input. This is because all inputs are string.
Thereby, the only introduction of null input into tag can only be done either 1. by direct access to the json data file or 2. by the developer. In this case, 2 is not possible since we used defensive programming in order to verify non-null tags.
The point is, there will never be a null tag that shows up in your json file if you use the CLI. So the Hiring Manager will never be able to take reference from the data and try out a null value.

Thirdly, the probability of a Hiring Manager using the null keyword is extremely low. Since most of the tags have tagName and tagCategory and are formatted as Strings using " ", There is a reasonable expectation that Hiring Manager will follow such a format when keying in tags.

image.png

Thus the assumption that a null appears in tag will be

  1. The hiring manager understands the null keyword and how to use it
  2. The hiring manager is intentionally trying to test the breaking point of the application

This deviates far too greatly from expected user behavior and would instead be a behavior of a user trying to break the application. With an extremely low probability of such an input and the logical case of using null close to 0, we therefore conclude this is a extreme user behaviour

image.png

Duplicate status (if any):

--