Catch format exceptions
@@ -20,7 +20,6 @@ import javafx.util.Callback;
import me.coley.recaf.config.Conf;
import me.coley.recaf.util.JavaFX;
import me.coley.recaf.util.Lang;
-import me.coley.recaf.util.Parse;
import me.coley.recaf.util.Reflect;
/**
@@ -237,6 +236,7 @@ public class ReflectivePropertySheet extends PropertySheet {
if (Number.class.isAssignableFrom(type) || (type.equals(int.class) || type.equals(long.class) || type.equals(
float.class) || type.equals(double.class))) {
String s = ((TextField) editor.getEditor()).getText();
+ try {
Object val = null;
if (type.equals(int.class) || type.equals(Integer.class)) {
val = Integer.parseInt(s);
@@ -251,6 +251,8 @@ public class ReflectivePropertySheet extends PropertySheet {
if (val != null && val.equals(0)) {
param.setValue(val);
}
+ } catch (Exception e) {}
+ // disregard number format exceptions
}
}
