Refactored assert checks
This commit is contained in:
parent
978ad933ca
commit
73d90d50f9
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue