I/O Exception handling

I very much prefer this approach: OutputStream out = new MyOutputStream(…); //may throw IOException try { //use the stream } finally { out.close(); } than this: OutputStream out = null; try { out = new MyOutputStream(…); //may throw IOException //use the stream } finally { if (out != null) { out.close(); } } I just […]




About

You are currently browsing the NewInstance weblog archives for anti-patterns.

Longer entries are truncated. Click the headline of an entry to read it in its entirety.

Calendar

May 2017
M T W T F S S
« Nov    
1234567
891011121314
15161718192021
22232425262728
293031  

Follow me

twitter flickr LinkedIn feed

Subscribe by email

Enter your email address:

Archives


Categories

Tag Cloud


Listening