Make fields final if possible to ensure immutability
This commit is contained in:
@@ -11,7 +11,7 @@ import appeng.api.storage.data.IAEItemStack;
|
||||
public class OreHelper
|
||||
{
|
||||
|
||||
public static OreHelper instance = new OreHelper();
|
||||
public static final OreHelper instance = new OreHelper();
|
||||
|
||||
class ItemRef
|
||||
{
|
||||
@@ -28,9 +28,9 @@ public class OreHelper
|
||||
hash = ref.hashCode() ^ damage;
|
||||
}
|
||||
|
||||
Item ref;
|
||||
int damage;
|
||||
int hash;
|
||||
final Item ref;
|
||||
final int damage;
|
||||
final int hash;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj)
|
||||
@@ -58,7 +58,7 @@ public class OreHelper
|
||||
|
||||
}
|
||||
|
||||
HashMap<ItemRef, OreResult> references = new HashMap<ItemRef, OreResult>();
|
||||
final HashMap<ItemRef, OreResult> references = new HashMap<ItemRef, OreResult>();
|
||||
|
||||
public OreReference isOre(ItemStack ItemStack)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user