Bug 788 - NumberFormatException
Summary: NumberFormatException
Status: RESOLVED FIXED
Alias: None
Product: Gear and Member Management System for library
Classification: Unclassified
Component: Java (show other bugs)
Version: unspecified
Hardware: PC Windows
: --- enhancement
Assignee: keithlam5
URL:
Depends on:
Blocks:
 
Reported: 2023-11-27 16:42 HKT by keithlam5
Modified: 2023-11-27 17:04 HKT (History)
1 user (show)

See Also:


Attachments
Bug_2 (26.01 KB, image/png)
2023-11-27 16:42 HKT, keithlam5
Details

Note You need to log in before you can comment on or make changes to this bug.
Description keithlam5 2023-11-27 16:42:52 HKT
Created attachment 152 [details]
Bug_2

Steps To Reproduce:

1. request 001 E1 17-Jan-2022 five


Actual Results: java.lang.NumberFormatException: For input string: "five"
	at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.base/java.lang.Integer.parseInt(Integer.java:652)
	at java.base/java.lang.Integer.parseInt(Integer.java:770)
	at code.CmdRequest.execute(CmdRequest.java:21)
	at Main.main(Main.java:53)

Expected Results: A warning of wrong number format
Comment 1 keithlam5 2023-11-27 17:04:16 HKT
In the CmdRequest.java, added catch for NumberFormatException