Fix invalid integer detection

This commit is contained in:
Grahame Grieve 2023-07-29 08:49:38 +10:00
parent c58703c63f
commit 5026ff3506
1 changed files with 3 additions and 0 deletions

View File

@ -112,6 +112,9 @@ public class Utilities {
return false;
}
String value = string.startsWith("-") ? string.substring(1) : string;
if (Utilities.noString(value)) {
return false;
}
for (char next : value.toCharArray()) {
if (!Character.isDigit(next)) {
return false;