So many useless else statements...

This commit is contained in:
gmcferrin
2013-01-09 22:43:21 -05:00
parent 75a5ffcb10
commit 8b9432d1d9
33 changed files with 358 additions and 407 deletions

View File

@ -8,8 +8,8 @@ public class ChunkletManagerFactory {
if(hConfig.getChunkletsEnabled()) {
return new HashChunkletManager();
} else {
return new NullChunkletManager();
}
return new NullChunkletManager();
}
}

View File

@ -65,11 +65,11 @@ public class HashChunkletManager implements ChunkletManager {
File yFile = new File(czDir, "" + y);
if(!yFile.exists()) {
continue;
} else {
ChunkletStore in = deserializeChunkletStore(yFile);
if(in != null) {
store.put(world.getName() + "," + cx + "," + cz + "," + y, in);
}
}
ChunkletStore in = deserializeChunkletStore(yFile);
if(in != null) {
store.put(world.getName() + "," + cx + "," + cz + "," + y, in);
}
}
}

View File

@ -8,8 +8,8 @@ public class ChunkManagerFactory {
if(hConfig.getChunkletsEnabled()) {
return new HashChunkManager();
} else {
return new NullChunkManager();
}
return new NullChunkManager();
}
}

View File

@ -61,9 +61,9 @@ public class HashChunkManager implements ChunkManager {
Object o = objectStream.readObject();
if (o instanceof ChunkStore) {
return (ChunkStore) o;
} else {
throw new RuntimeException("Wrong class type read for chunk meta data for " + x + ", " + z);
}
throw new RuntimeException("Wrong class type read for chunk meta data for " + x + ", " + z);
} catch (IOException e) {
// Assume the format changed
return null;