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 111038 - "Rename" refactoring can corrupt Java source
Summary: "Rename" refactoring can corrupt Java source
Status: RESOLVED DUPLICATE of bug 95533
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P1 blocker (vote)
Assignee: Pavel Flaska
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-26 02:29 UTC by weiland
Modified: 2007-07-26 09:37 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 weiland 2007-07-26 02:29:59 UTC
Applying rename in the presence of certain code constructs corrupts code; this could cause widespread problems in a big
project with a public name.  Here's a simple example:

public void foo () {
    int renameMe = 0;
    int x, y;
    // more code...
}

Renaming renameMe (e.g., to renameYou) results in this, which of course doesn't compile:
public void foo () {
    int renameYou = 0;
    int x,        int x, y;
    // more code...
}

This happens in 6.0 M10.
Comment 1 Pavel Flaska 2007-07-26 09:37:58 UTC
It is already fixed, use current trunk build. Thanks for the report anyway.

*** This issue has been marked as a duplicate of 95533 ***