-
Type:
Story
-
Status: Closed
-
Priority:
Minor
-
Resolution: Completed
-
Affects Version/s: None
-
Fix Version/s: 7.0.0 DXP FP46, 7.0.6 CE GA7, 7.0.0 DXP SP8, 7.0.X, 7.1.X, 7.2.X, Master
-
Component/s: Dev Tools > Source Formatter
-
Branch Version/s:7.2.x, 7.0.x
-
Backported to Branch:Committed
-
Priority Level:Low
-
Epic Link:
Use
long l = GetterUtil.getLong(s)
Instead of
long l = Long.parseLong(s)
Unless we want to validate that s is a proper long and catch the NumberFormatException that can be thrown by Long.parseLong:
try { long l = Long.parseLong(s); } catch (NumberFormatException npe) { // do stuff when s is not a proper long }
- causes
-
LPS-84623 Form Number Validation Allows Text Input
- Closed