Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Andreas Leitgeb Newsgroups: comp.lang.java.programmer Subject: Re: Does this make sense? Date: Thu, 4 Apr 2019 15:15:33 -0000 (UTC) Organization: A noiseless patient Spider Lines: 11 Message-ID: References: Reply-To: avl@logic.at Injection-Date: Thu, 4 Apr 2019 15:15:33 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="e62b29e720dbf7aab24875ead4725a5d"; logging-data="25146"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Oy8dQYQku3yuoTDk8w5ej" User-Agent: slrn/1.0.3 (Linux) Cancel-Lock: sha1:kLLt8M3D1ABVqpo8xPwfmH2KrVw= Xref: csiph.com comp.lang.java.programmer:38866 Eric Douglas wrote: > On Thursday, April 4, 2019 at 9:03:28 AM UTC-4, Eric Sosman wrote: >> > } finally { >> > try { >> > fos.close(); >> Aside: I think you need a null-test here. > Is a null even possible? It would have to crash in the 'new'. Exactly! It's the purpose of the "finally" block to be run *also* in case of an exception in the "try"-block.