Unnecessary null check before instanceof

This commit is contained in:
thatsIch
2015-03-26 11:22:31 +01:00
parent d8f452b665
commit d81eb1fe2d
4 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -433,7 +433,7 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
if ( this instanceof ISegmentedInventory )
{
IInventory inv = ((ISegmentedInventory) this).getInventoryByName( "config" );
if ( inv != null && inv instanceof AppEngInternalAEInventory )
if ( inv instanceof AppEngInternalAEInventory )
{
AppEngInternalAEInventory target = (AppEngInternalAEInventory) inv;
AppEngInternalAEInventory tmp = new AppEngInternalAEInventory( null, target.getSizeInventory() );
@@ -477,7 +477,7 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
if ( this instanceof ISegmentedInventory )
{
IInventory inv = ((ISegmentedInventory) this).getInventoryByName( "config" );
if ( inv != null && inv instanceof AppEngInternalAEInventory )
if ( inv instanceof AppEngInternalAEInventory )
{
((AppEngInternalAEInventory) inv).writeToNBT( output, "config" );
}