Bug 490

Summary: Array Index out of Bounds
Product: Group 15 Reporter: YIP Chun Ho <aidanyip2-c>
Component: Coronavirus TrackerAssignee: YIP Chun Ho <aidanyip2-c>
Status: CONFIRMED ---    
Severity: enhancement CC: aidanyip2-c, ckchan599-c
Priority: Normal    
Version: 1.0   
Hardware: PC   
OS: Windows   

Description YIP Chun Ho 2020-11-27 03:54:26 HKT
java.lang.StringIndexOutOfBoundsException throws
after input null as patient info
Comment 1 YIP Chun Ho 2020-11-27 03:59:52 HKT
1. Input "c" to create patient
2. Press enter again within input any patient info
3. Exception throws
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
Enter patientID, patientName, gender, status and a list of location visited:
	at java.base/java.lang.StringLatin1.charAt(StringLatin1.java:48)
	at java.base/java.lang.String.charAt(String.java:711)
	at infectionTracker.Command.CreatePatientCommand.execute(CreatePatientCommand.java:45)
	at infectionTracker.Main.main(Main.java:39)
Comment 2 YIP Chun Ho 2020-12-07 23:37:24 HKT
*** Bug 489 has been marked as a duplicate of this bug. ***