坦克大战(一期)-设计模式-备忘录模式1.2

DesignPatterns
bingor 2 years ago
parent 07b55675f3
commit e084821a98

@ -138,10 +138,12 @@ public class GameModel {
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} finally { } finally {
try { if(null != oos) {
oos.close(); try {
} catch (IOException e) { oos.close();
e.printStackTrace(); } catch (IOException e) {
e.printStackTrace();
}
} }
} }
} }
@ -156,13 +158,14 @@ public class GameModel {
} catch (IOException | ClassNotFoundException e) { } catch (IOException | ClassNotFoundException e) {
e.printStackTrace(); e.printStackTrace();
} finally { } finally {
try { if(null != ois) {
ois.close(); try {
} catch (IOException e) { ois.close();
e.printStackTrace(); } catch (IOException e) {
e.printStackTrace();
}
} }
} }
} }
} }

Loading…
Cancel
Save