david-eom / CS2103T-PE

0 stars 0 forks source link

Incorrect exception thrown for big index #5

Open david-eom opened 3 years ago

david-eom commented 3 years ago

When we type in editTask 2147483647 n/CS2105 Assg 3 in the window, it says "The task index provided is invalid". Normally we would expect the same exception to be thrown for editTask 2147483648 n/CS2105 Assg 3 as we only incremented the index by one.

截圖 2021-11-12 下午4.35.15.png

However, when we do type in editTask 2147483648 n/CS2105 Assg 3, a it shows invalid command format when the format is actually valid, just that the index is too big.

截圖 2021-11-12 下午4.35.54.png

This shows that ManageMe did not handle Integer.maxint value properly in its parser implementation. A user might get confused for this.

The same error persists for all INDEX based commands e.g. editMod, editTask and so on.

nus-pe-bot commented 3 years ago

Team's Response

No details provided by team.

The 'Original' Bug

[The team marked this bug as a duplicate of the following bug]

Incorrect exception thrown for index 0

To reproduce:

  1. type clear to purge the databse
  2. type editLink 1 n/asdf, the error The link index provided is invalid pops up
  3. type editLink 0 n/asdf, we would expect the same error. But instead the error Invalid command format is being thrown.

This bug persists for all index based commands.

For non-zero indexes: 截圖 2021-11-12 下午4.55.28.png

For zero indexes: 截圖 2021-11-12 下午4.55.08.png


[original: nus-cs2103-AY2122S1/pe-interim#2933] [original labels: severity.Low type.FunctionalityBug]

Their Response to the 'Original' Bug

[This is the team's response to the above 'original' bug]

We only accept integers between 1 and 2147483647 for the index, which is indicated in the error message. In both the UG and the app itself, a command with an index out of the range is defined as having invalid format.

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: [replace this with your explanation]


:question: Issue response

Team chose [response.Rejected]

Reason for disagreement: [replace this with your explanation]


:question: Issue severity

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

Reason for disagreement: [replace this with your explanation]