This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 103389 - Surround with try ... catch brokes the code
Summary: Surround with try ... catch brokes the code
Status: VERIFIED DUPLICATE of bug 104085
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-06 11:33 UTC by Tim Lebedkov
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Lebedkov 2007-05-06 11:33:50 UTC
After applying the following quick fix:
            try {
                t.transform(source, result);
            } finally {
                if (result.getOutputStream() != null)
<quick fix is here>                    result.getOutputStream().close();
            }

the code looks like this:
            try {
                t.transform(source, result);
            }catch (IOException ex) {
    Exceptions.printStackTrace(ex);
}
 finally {
                if (result.getOutputStream() != null)
                    result.getOutputStream().close();
            }
which is wrong because I wanted another try/catch pair *inside* the finally block
Comment 1 Jan Lahoda 2007-08-28 19:42:04 UTC

*** This issue has been marked as a duplicate of 104085 ***
Comment 2 Tim Lebedkov 2007-09-19 18:40:31 UTC
ok