getValueAsInt - Checking if parsed long is within Java Integer.INT range

getValueAsInt - Using the int copy of NumerUtilities.parseLong
AskDialog: Organize commits
This commit is contained in:
foralost
2023-02-26 22:28:51 +01:00
committed by Ryan Kurtz
parent b30a94edc6
commit 62b96db10b
2 changed files with 53 additions and 2 deletions

View File

@@ -246,7 +246,12 @@ public class AskDialog<T> extends DialogComponentProvider {
protected Integer getValueAsInt() {
String text = getValueAsString();
return text != null ? Integer.decode(text) : null;
if (text == null) {
return null;
}
return NumericUtilities.parseInt(text);
}
protected Long getValueAsLong() {