This commit is contained in:
Magnus Ulf 2019-01-03 16:27:04 +01:00
parent fdb26254b1
commit 4374add2cd
2 changed files with 2 additions and 2 deletions

View File

@ -25,7 +25,7 @@ public class TypeDouble extends TypeAbstractNumber<Double>
@Override @Override
public Double valueOf(String arg, CommandSender sender) throws Exception public Double valueOf(String arg, CommandSender sender) throws Exception
{ {
var ret = Double.parseDouble(arg); double ret = Double.parseDouble(arg);
if (!Double.isFinite(ret)) throw new Exception(); if (!Double.isFinite(ret)) throw new Exception();
return ret; return ret;
} }

View File

@ -25,7 +25,7 @@ public class TypeFloat extends TypeAbstractNumber<Float>
@Override @Override
public Float valueOf(String arg, CommandSender sender) throws Exception public Float valueOf(String arg, CommandSender sender) throws Exception
{ {
var ret = Float.parseFloat(arg); float ret = Float.parseFloat(arg);
if (!Float.isFinite(ret)) throw new Exception(); if (!Float.isFinite(ret)) throw new Exception();
return ret; return ret;
} }