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 98058

Summary: [rename field] Renaming parenthesized field assignment yields compilation error
Product: editor Reporter: kely_garcia <kely_garcia>
Component: RefactoringAssignee: issues@java <issues>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:

Description kely_garcia 2007-03-16 04:45:24 UTC
Build ID: 200609161800 (Netbeans 6.0 M3)

Steps To Reproduce:
Rename field "f" to "newF" on the following:
public class A {
    int f;
    
    void m(int g){
        (f)=g;
    }  
}

Yields the following refactored class:
public class A {
    int newF;
    
    void m(int g){
        (f)=g;
    }  
}

Note: Field "f" can only be renamed outside method "m". 
If you try to rename field "f" inside method "m", you get this error: Cannot 
rename this type of object. Java package, method, field or class must be 
selected.
Comment 1 Pavel Flaska 2007-03-22 21:39:06 UTC
The issue is no longer reproducible in current trunk build, please, try to
reproduce in new builds. Tested in custom build 20070322.

Marking as fixed, reopen, if you are able to reproduce in current builds. 
Thanks for the report. Also rename in parenthesized is possible now.