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
@@ -11,7 +11,7 @@ import appeng.core.sync.packets.PacketCompassRequest;
public class CompassManager
{
public static CompassManager instance = new CompassManager();
public static final CompassManager instance = new CompassManager();
class CompassRequest
{
@@ -48,7 +48,7 @@ public class CompassManager
}
HashMap<CompassRequest, CompassResult> requests = new HashMap<CompassRequest, CompassResult>();
final HashMap<CompassRequest, CompassResult> requests = new HashMap<CompassRequest, CompassResult>();
public void postResult(long attunement, int x, int y, int z, CompassResult result)
{
@@ -62,7 +62,7 @@ final public class MeteoriteWorldGen implements IWorldGenerator
final int x;
final int z;
final World w;
int depth;
final int depth;
public MeteoriteSpawn(int x, int depth, int z, World w) {
this.x = x;
+2 -2
View File
@@ -58,7 +58,7 @@ public class TickHandler
final public static TickHandler instance = new TickHandler();
final private WeakHashMap<World, Queue<Callable>> callQueue = new WeakHashMap<World, Queue<Callable>>();
Queue<Callable> serverQueue = new LinkedList<Callable>();
final Queue<Callable> serverQueue = new LinkedList<Callable>();
final private HandlerRep server = new HandlerRep();
final private HandlerRep client = new HandlerRep();
@@ -282,7 +282,7 @@ public class TickHandler
// AELog.info( "processQueue Time: " + time + "ms" );
}
Multimap<World, CraftingJob> craftingJobs = LinkedListMultimap.create();
final Multimap<World, CraftingJob> craftingJobs = LinkedListMultimap.create();
public void registerCraftingSimulation(World world, CraftingJob craftingJob)
{