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 228694 - New hint for adding catch statement to try-catch with resources
Summary: New hint for adding catch statement to try-catch with resources
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-18 10:31 UTC by Jiri Prox
Modified: 2015-10-05 13:08 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 Jiri Prox 2013-04-18 10:31:00 UTC
A hint for adding 'catch(IOException ex)' should by provided in following code:

        try (FileReader fr = new FileReader("");) {
        } catch (FileNotFoundException ex) {
            Logger.getLogger(ClassB.class.getName()).log(Level.SEVERE, null, ex);
        }

The IOException have to be handled due to implicit 'close()' call
Comment 1 Svata Dedic 2015-10-05 13:08:59 UTC
Already fixed