Bug 517

Summary: login string check
Product: Group 20 Travel Booking System Reporter: kctung6-c
Component: AppAssignee: manttsang3-c
Status: RESOLVED FIXED    
Severity: enhancement CC: jiajunye3-c, kctung6-c, yiuschan9-c, yuhoitse2-c
Priority: ---    
Version: unspecified   
Hardware: PC   
OS: Windows   

Description kctung6-c 2020-12-05 22:30:25 HKT
When I type others string, other than 1, 2, 3 in the main menu, the following exception is shown:

Login string check:

java.lang.NumberFormatException: For input string: "test"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.lang.Integer.parseInt(Integer.java:580)
	at java.lang.Integer.parseInt(Integer.java:615)
	at com.grouptwenty.travelbooking.App.loginOrRegister(App.java:176)
	at com.grouptwenty.travelbooking.App.start(App.java:129)
	at com.grouptwenty.travelbooking.Main.main(Main.java:6)
Comment 1 manttsang3-c 2020-12-05 23:30:05 HKT
Bug fixed.

The bug occurs because of the lack of checking.