mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-28 00:50:46 +00:00
Java 7 try-with-resources
Java 7 multi catch
This commit is contained in:
@@ -2140,10 +2140,10 @@ public class AVM2Code implements Serializable {
|
||||
public AVM2Code deepCopy() {
|
||||
try {
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
ObjectOutputStream oos = new ObjectOutputStream(baos);
|
||||
oos.writeObject(this);
|
||||
oos.flush();
|
||||
oos.close();
|
||||
try (ObjectOutputStream oos = new ObjectOutputStream(baos)) {
|
||||
oos.writeObject(this);
|
||||
oos.flush();
|
||||
}
|
||||
ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(baos.toByteArray()));
|
||||
AVM2Code copy = (AVM2Code) ois.readObject();
|
||||
ois.close();
|
||||
|
||||
Reference in New Issue
Block a user