Java 8
This commit is contained in:
parent
fdb26254b1
commit
4374add2cd
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user