Bug 370702 - Unexpected resource leak exception in case of caught exception
Summary: Unexpected resource leak exception in case of caught exception
Status: VERIFIED DUPLICATE of bug 368546
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.8   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 3.8 M6   Edit
Assignee: Stephan Herrmann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-06 06:10 EST by Dani Megert CLA
Modified: 2012-02-07 02:05 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2012-02-06 06:10:45 EST
3.8 M5

http://git.eclipse.org/c/platform/eclipse.platform.releng.git/tree/bundles/org.eclipse.test/src/org/eclipse/test/EclipseTestRunner.java


        if (outfile != null) {
            try {
                out = new FileOutputStream(outfile);
            } catch (java.io.IOException e) {
                throw new BuildException(e);
            }
        }
        r.setOutput(out);
        return r;

reports a leak on 'out' inside the catch block. However, 'out' can only be 'null' at this location.
Comment 1 Dani Megert CLA 2012-02-06 06:12:34 EST
For a second instance of this, see

org.eclipse.jdt.internal.ui.preferences.formatter.ProfileStore.writeProfilesToFile(Collection<Profile>, File, String)
Comment 2 Stephan Herrmann CLA 2012-02-06 19:31:18 EST
I don't see these warnings in HEAD, I'm pretty sure they've been fixed
as part of bug 368546 (M6).

Let me know if you still see problems in builds >= N20120205-2000.

*** This bug has been marked as a duplicate of bug 368546 ***
Comment 3 Dani Megert CLA 2012-02-07 02:05:39 EST
Verified in N20120206-2000 that the errors are gone.