Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 176901 - Rename refactoring doesn't handle renaming local variables correctly
Rename refactoring doesn't handle renaming local variables correctly
Product: javafx
Classification: Unclassified
Component: Unsupported
PC Windows XP
: P3 (vote)
: 6.x
Assigned To: J Bachorik
Depends on:
  Show dependency treegraph
Reported: 2009-11-16 06:54 UTC by Alexandr Scherbatiy
Modified: 2010-01-25 05:08 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description Alexandr Scherbatiy 2009-11-16 06:54:32 UTC
Steps to reproduce:

- Copy the code to the editor:
function f() {

    var seq = [1, 2, 3];

    for (n in seq) {

    for (m in seq) {
        var n = m * m;


- Refactor-> Rename the 'n' to 'n2' variable in 'for (n in seq) {' loop
  The 'n' variable is renamed in the second loop instead of the first

- Build the code

JavaFXApplication13\src\javafxapplication13\Main.fx:18: cannot find symbol
symbol  : variable n2
location: class javafxapplication13.Main
1 error
Comment 1 J Bachorik 2009-11-17 07:28:52 UTC
Actually, this issue will be observable when renaming any local variable with the same named non-local variable.
I have fix ready but it will probably not get to 6.8.
Comment 2 J Bachorik 2009-12-01 03:33:37 UTC
fixed in
Comment 3 Alexandr Scherbatiy 2009-12-09 07:07:41 UTC
verified in NetBeans-JavaFX-Soma  #60
Comment 4 rbalada 2010-01-21 02:36:34 UTC
The fix has been ported to release68_fixes branch
Comment 5 Alexandr Scherbatiy 2010-01-25 05:08:24 UTC
Verified in patch1 from

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo