Made some more fields final.

This commit is contained in:
Robin Kupper
2011-04-20 10:53:34 +02:00
parent 13a9557de2
commit 645a305649
2 changed files with 12 additions and 12 deletions

View File

@@ -23,11 +23,11 @@ public class Consumer extends TimerTask implements Runnable
private final LogBlock logblock; private final LogBlock logblock;
private final Logger log; private final Logger log;
private final Config config; private final Config config;
private LinkedBlockingQueue<BlockRow> bqueue = new LinkedBlockingQueue<BlockRow>(); private final LinkedBlockingQueue<BlockRow> bqueue = new LinkedBlockingQueue<BlockRow>();
private LinkedBlockingQueue<KillRow> kqueue = new LinkedBlockingQueue<KillRow>(); private final LinkedBlockingQueue<KillRow> kqueue = new LinkedBlockingQueue<KillRow>();
private HashSet<Integer> hiddenplayers = new HashSet<Integer>(); private final HashSet<Integer> hiddenplayers = new HashSet<Integer>();
private HashMap<Integer, Integer> lastAttackedEntity = new HashMap<Integer, Integer>(); private final HashMap<Integer, Integer> lastAttackedEntity = new HashMap<Integer, Integer>();
private HashMap<Integer, Long> lastAttackTime = new HashMap<Integer, Long>(); private final HashMap<Integer, Long> lastAttackTime = new HashMap<Integer, Long>();
Consumer (LogBlock logblock) { Consumer (LogBlock logblock) {

View File

@@ -112,8 +112,8 @@ public class Rollback implements Runnable
private class PerformRollback implements Runnable private class PerformRollback implements Runnable
{ {
private LinkedBlockingQueue<Edit> edits; private final LinkedBlockingQueue<Edit> edits;
private Rollback rollback; private final Rollback rollback;
int successes = 0; int successes = 0;
int errors = 0; int errors = 0;
int blacklisteds = 0; int blacklisteds = 0;
@@ -155,10 +155,10 @@ public class Rollback implements Runnable
private class Edit private class Edit
{ {
int type, replaced; final int type, replaced;
int x, y, z; final int x, y, z;
byte data; final byte data;
World world; final World world;
Edit(int type, int replaced, byte data, int x, int y, int z, World world) { Edit(int type, int replaced, byte data, int x, int y, int z, World world) {
this.type = type; this.type = type;