Make fields final if possible to ensure immutability
This commit is contained in:
@@ -335,7 +335,7 @@ public class CellInventory implements ICellInventory
|
||||
return 8 - div;
|
||||
}
|
||||
|
||||
private static HashSet<Integer> blackList = new HashSet<Integer>();
|
||||
private static final HashSet<Integer> blackList = new HashSet<Integer>();
|
||||
|
||||
public static void addBasicBlackList(int itemID, int Meta)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ import appeng.util.item.AEItemStack;
|
||||
public class CreativeCellInventory implements IMEInventoryHandler<IAEItemStack>
|
||||
{
|
||||
|
||||
IItemList<IAEItemStack> itemListCache = AEApi.instance().storage().createItemList();
|
||||
final IItemList<IAEItemStack> itemListCache = AEApi.instance().storage().createItemList();
|
||||
|
||||
public static IMEInventoryHandler getCell(ItemStack o)
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@ import appeng.api.storage.data.IAEStack;
|
||||
public class DriveWatcher<T extends IAEStack<T>> extends MEInventoryHandler<T>
|
||||
{
|
||||
|
||||
int oldStatus = 0;
|
||||
final int oldStatus = 0;
|
||||
final ItemStack is;
|
||||
final ICellHandler handler;
|
||||
final IChestOrDrive cord;
|
||||
|
||||
@@ -48,9 +48,9 @@ public class ItemWatcher implements IStackWatcher
|
||||
|
||||
}
|
||||
|
||||
GridStorageCache gsc;
|
||||
IStackWatcherHost myObject;
|
||||
HashSet<IAEStack> myInterests = new HashSet<IAEStack>();
|
||||
final GridStorageCache gsc;
|
||||
final IStackWatcherHost myObject;
|
||||
final HashSet<IAEStack> myInterests = new HashSet<IAEStack>();
|
||||
|
||||
public ItemWatcher(GridStorageCache cache, IStackWatcherHost host) {
|
||||
gsc = cache;
|
||||
|
||||
@@ -15,8 +15,8 @@ import appeng.util.item.AEItemStack;
|
||||
public class MEIInventoryWrapper implements IMEInventory<IAEItemStack>
|
||||
{
|
||||
|
||||
protected IInventory target;
|
||||
protected InventoryAdaptor adaptor;
|
||||
protected final IInventory target;
|
||||
protected final InventoryAdaptor adaptor;
|
||||
|
||||
public MEIInventoryWrapper(IInventory m, InventoryAdaptor ia) {
|
||||
target = m;
|
||||
|
||||
@@ -18,7 +18,7 @@ import appeng.util.inv.ItemListIgnoreCrafting;
|
||||
public class MEMonitorPassThrough<T extends IAEStack<T>> extends MEPassThrough<T> implements IMEMonitor<T>, IMEMonitorHandlerReceiver<T>
|
||||
{
|
||||
|
||||
HashMap<IMEMonitorHandlerReceiver<T>, Object> listeners = new HashMap<IMEMonitorHandlerReceiver<T>, Object>();
|
||||
final HashMap<IMEMonitorHandlerReceiver<T>, Object> listeners = new HashMap<IMEMonitorHandlerReceiver<T>, Object>();
|
||||
IMEMonitor<T> monitor;
|
||||
|
||||
public BaseActionSource changeSource;
|
||||
|
||||
@@ -12,7 +12,7 @@ import appeng.tile.misc.TileCondenser;
|
||||
public class VoidFluidInventory implements IMEInventoryHandler<IAEFluidStack>
|
||||
{
|
||||
|
||||
TileCondenser target;
|
||||
final TileCondenser target;
|
||||
|
||||
public VoidFluidInventory(TileCondenser te) {
|
||||
target = te;
|
||||
|
||||
@@ -12,7 +12,7 @@ import appeng.tile.misc.TileCondenser;
|
||||
public class VoidItemInventory implements IMEInventoryHandler<IAEItemStack>
|
||||
{
|
||||
|
||||
TileCondenser target;
|
||||
final TileCondenser target;
|
||||
|
||||
public VoidItemInventory(TileCondenser te) {
|
||||
target = te;
|
||||
|
||||
Reference in New Issue
Block a user