New loop detection algorithm

This commit is contained in:
Jindra Petk
2013-06-09 05:59:59 +02:00
parent 66daf6fe8e
commit b8778ba2f1
14 changed files with 896 additions and 642 deletions

View File

@@ -2144,9 +2144,10 @@ public class AVM2Code implements Serializable {
oos.writeObject(this);
oos.flush();
}
ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(baos.toByteArray()));
AVM2Code copy = (AVM2Code) ois.readObject();
ois.close();
AVM2Code copy;
try (ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(baos.toByteArray()))) {
copy = (AVM2Code) ois.readObject();
}
return copy;
} catch (Exception ex) {
ex.printStackTrace();