nus-cs2113-AY2223S1 / pe-dev-response

0 stars 0 forks source link

NumberFormatException #983

Open nus-pe-bot opened 1 year ago

nus-pe-bot commented 1 year ago

bug1.PNG

Can cause a number format exception by including a | into the client name. Exception caused when pairing such a name with a property.


[original: nus-cs2113-AY2223S1/pe-interim#949] [original labels: severity.Low type.FunctionalityBug]

ngdeqi commented 1 year ago

Team's Response

1.png

Added a client with | in the name but can successfully pair it with a property.

After more attempts to reproduce the bug, discovered that the error lies in the fact that in add -property feature, a property rental price of 1111111111111111111111111111111111111111111111111111111111111111111111111111 is accepted as a valid rental price (as a string) even though java.Integer's max integer value is smaller than that. Therefore, there is a numberFormatException when pair tries to parse it to an integer when checking if the property rental price falls within the client's budget

Duplicate status (if any):

Duplicate of #877