Refactored assert checks

This commit is contained in:
LemADEC 2017-01-08 04:03:38 +01:00
parent 978ad933ca
commit 73d90d50f9

View file

@ -258,10 +258,12 @@ public abstract class TileEntityAbstractBase extends TileEntity implements IBloc
}
protected static double toDouble(Object object) {
assert(!(object instanceof Object[]));
return Double.parseDouble(object.toString());
}
protected static float toFloat(Object object) {
assert(!(object instanceof Object[]));
return Float.parseFloat(object.toString());
}
@ -269,7 +271,7 @@ public abstract class TileEntityAbstractBase extends TileEntity implements IBloc
if (object == null) {
return false;
}
assert(object instanceof Object[] == false);
assert(!(object instanceof Object[]));
if (object instanceof Boolean) {
return ((Boolean) object);
}