Bug 205853 - close Closable objects
Summary: close Closable objects
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-09 14:34 EDT by Zohar Amir CLA
Modified: 2007-10-09 14:34 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zohar Amir CLA 2007-10-09 14:34:02 EDT
I have a code segment that does IO operations, and uses Channels to do so. I 
now want to surround this code with try-finally block, to close any open 
channels I have there. For this I need to declare the IO objects outside the 
try block and then, in the finally block, check that they are not null and 
close them.
1. I think not surrounding Closable objects with try-finally in such a way may qualify as a warning
2. There should be a quick fix to do all this.