Parse release number properly, use Preconditions in IndexedFileSystem.

This commit is contained in:
Major-
2015-02-25 16:35:10 +00:00
parent 5814c5b44f
commit 649dcfc239
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -167,7 +167,7 @@ public final class Server {
serviceManager.startAll();
int releaseNo = context.getRelease().getReleaseNumber();
IndexedFileSystem fs = new IndexedFileSystem(Paths.get("data/fs/", Integer.toString(releaseNo)), true);
IndexedFileSystem fs = new IndexedFileSystem(Paths.get("data/fs", Integer.toString(releaseNo)), true);
World.getWorld().init(releaseNo, fs, manager);
}
+1 -1
View File
@@ -177,7 +177,7 @@ public final class IndexedFileSystem implements Closeable {
int nextType = header[7] & 0xFF;
if (i != curChunk) {
throw new IOException("Chunk id mismatch.");
Preconditions.checkArgument(i == curChunk, "Chunk id mismatch.");
}
int chunkSize = size - read;