Close sign data object stream

This commit is contained in:
Daniel Saukel 2019-02-24 01:08:33 +01:00
parent 420b880c63
commit 9139320888

View File

@ -74,8 +74,8 @@ public class SignData {
public void deserializeSigns(DEditWorld editWorld) { public void deserializeSigns(DEditWorld editWorld) {
try { try {
ObjectInputStream os = new ObjectInputStream(new FileInputStream(file)); ObjectInputStream os = new ObjectInputStream(new FileInputStream(file));
int length = os.readInt();
int length = os.readInt();
for (int i = 0; i < length; i++) { for (int i = 0; i < length; i++) {
int x = os.readInt(); int x = os.readInt();
int y = os.readInt(); int y = os.readInt();
@ -94,6 +94,8 @@ public class SignData {
} }
} }
os.close();
} catch (IOException exception) { } catch (IOException exception) {
exception.printStackTrace(); exception.printStackTrace();
} }