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 228698 - Smart code completion should provide IOE in catch of try-catch with resources
Summary: Smart code completion should provide IOE in catch of try-catch with resources
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P4 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-18 10:55 UTC by Jiri Prox
Modified: 2013-08-30 11:54 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:55:55 UTC
Smart code completion should recognize implicit 'close()' call in try-with resources.

Code example:
    public void test() {
        try (FileReader fr = new FileReader("");) {
        } catch (FileNotFoundException ex) {
            Logger.getLogger(ClassB.class.getName()).log(Level.SEVERE, null, ex);
        } catch (|


-> smart code completion should provide IOException at the position marked by |


Product Version: NetBeans IDE Dev (Build 201304162301)
Java: 1.8.0-ea; Java HotSpot(TM) 64-Bit Server VM 25.0-b23
Runtime: Java(TM) SE Runtime Environment 1.8.0-ea-b82
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
User directory: C:\Users\jprox\AppData\Roaming\NetBeans\dev
Cache directory: C:\Users\jprox\AppData\Local\NetBeans\Cache\dev
Comment 1 Dusan Balek 2013-04-23 12:48:08 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/d6ce2073b891
Comment 2 Quality Engineering 2013-04-28 02:18:47 UTC
Integrated into 'main-golden', will be available in build *201304272301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/d6ce2073b891
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #228698: Smart code completion should provide IOE in catch of try-catch with resources - fixed.
Comment 3 Jiri Prox 2013-08-30 11:54:11 UTC
v.