fix integer validation issue

This commit is contained in:
Grahame Grieve 2019-07-30 11:40:34 +10:00
parent 61e2fa1d39
commit f9a06ae2b8
1 changed files with 2 additions and 0 deletions

View File

@ -123,6 +123,8 @@ public class Utilities {
if (isBlank(string)) {
return false;
}
if (string.startsWith("-"))
string = string.substring(1);
for (char next : string.toCharArray()) {
if (!Character.isDigit(next)) {
return false;