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 199166

Summary: Cannot rename try-with-resources variables
Product: java Reporter: _ gtzabari <gtzabari>
Component: SourceAssignee: Jan Lahoda <jlahoda>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 7.0   
Hardware: PC   
OS: Windows 7 x64   
Issue Type: DEFECT Exception Reporter:

Description _ gtzabari 2011-06-04 18:52:02 UTC
Java build 1.7.0-ea-b144

Given:

"try (ResultSet rs = metaData.getPrimaryKeys(null, schemaName, tableName))"

1. Place the caret on top of "rs" and hit CTRL+R
2. Rename the variable to "foo"
3. Netbeans makes the following changes:

"try (foosultSet rs = metaData.getPrimaryKeys(null, schemaName, tableName))"

4. Notice how the variable name remains unchanged but its type is now mangled.
Comment 1 Quality Engineering 2011-06-07 06:31:01 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/
User: 
Log:
Comment 3 Quality Engineering 2011-06-15 04:40:26 UTC
Integrated into 'releases'
Changeset: http://hg.netbeans.org/releases/rev/3ddb6c8bae4d
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #199166: updating the nb-javac library
Comment 4 Quality Engineering 2011-06-15 14:08:33 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/b01e2a803e72
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #199166: fixing position of the try's resource