commit | 5c32b6da4400c85db2245de3bc18c91d495ce1c5 | [log] [tgz] |
---|---|---|
author | Jean Chalard <jchalard@google.com> | Tue Nov 13 16:28:57 2012 +0900 |
committer | Jean Chalard <jchalard@google.com> | Tue Nov 13 16:53:07 2012 +0900 |
tree | 187cd68f500734051270e05171fae35354aa9c8a | |
parent | bc43e3f29060252d2a08b4e976bdb2ca50438623 [diff] |
Make sure all FDs are correctly closed. In this kind of series of calls, it's possible that an outer call to a constructor fails, but the inner succeeded. Example: try { is = new A(new B()); } finally { if (null != is) is.close(); } In this case, if new B() succeeds but new A() throws an exception, is stays null and the intermediate object is never closed. This is what was happening in this instance. Bug: 7377336 Change-Id: I3fae9fec1135244982fcf5098c76d93f3e0f2add