Removed debug statement.

This commit is contained in:
Andrew Lalis 2021-06-01 09:53:52 +02:00
parent 50535d4bc0
commit e88c51c152
1 changed files with 3 additions and 1 deletions

View File

@ -58,7 +58,6 @@ public class ClusterIO {
public Cluster load(Path path, char[] password) throws Exception { public Cluster load(Path path, char[] password) throws Exception {
try (var is = Files.newInputStream(path)) { try (var is = Files.newInputStream(path)) {
int version = ByteUtils.readInt(is); int version = ByteUtils.readInt(is);
System.out.println("File version: " + version);
if (version < FILE_VERSION) { if (version < FILE_VERSION) {
System.err.println("Warning! Reading older file version: " + version); System.err.println("Warning! Reading older file version: " + version);
} }
@ -126,6 +125,9 @@ public class ClusterIO {
public Cluster loadUnencrypted(Path path) throws IOException { public Cluster loadUnencrypted(Path path) throws IOException {
try (var is = Files.newInputStream(path)) { try (var is = Files.newInputStream(path)) {
int version = ByteUtils.readInt(is); int version = ByteUtils.readInt(is);
if (version < FILE_VERSION) {
System.err.println("Warning! Reading older file version: " + version);
}
int encryptionFlag = is.read(); int encryptionFlag = is.read();
if (encryptionFlag == 1) throw new IOException("File is encrypted."); if (encryptionFlag == 1) throw new IOException("File is encrypted.");
return ClusterSerializer.readCluster(is); return ClusterSerializer.readCluster(is);