Make fields final if possible to ensure immutability

This commit is contained in:
thatsIch
2014-09-29 09:54:34 +02:00
parent 35f6c84d9f
commit 474596f095
261 changed files with 607 additions and 597 deletions
@@ -49,7 +49,7 @@ import com.google.common.collect.ImmutableSet;
public class ItemMultiMaterial extends AEBaseItem implements IStorageComponent, IUpgradeModule
{
HashMap<Integer, MaterialType> dmgToMaterial = new HashMap<Integer, MaterialType>();
final HashMap<Integer, MaterialType> dmgToMaterial = new HashMap<Integer, MaterialType>();
public static ItemMultiMaterial instance;
@@ -63,7 +63,7 @@ public class ItemMultiMaterial extends AEBaseItem implements IStorageComponent,
class SlightlyBetterSort implements Comparator<String>
{
Pattern p;
final Pattern p;
public SlightlyBetterSort(Pattern p) {
this.p = p;
@@ -66,7 +66,7 @@ public enum MaterialType
BlankPattern(52), CardCrafting(53);
private String oreName;
private EnumSet<AEFeature> features;
private final EnumSet<AEFeature> features;
private Class<? extends Entity> droppedEntity;
// IIcon for the material.