Please use the Apache issue tracking system for new NetBeans issues ( !!

Bug 176901

Summary: Rename refactoring doesn't handle renaming local variables correctly
Product: javafx Reporter: Alexandr Scherbatiy <sunflower>
Component: UnsupportedAssignee: J Bachorik <yardus>
Status: VERIFIED FIXED QA Contact: issues <>
Priority: P3 CC: sustaining
Version: 6.x   
Target Milestone: 6.x   
Hardware: PC   
OS: Windows XP   
Whiteboard: 68patch1-verified
Issue Type: DEFECT Exception Report:

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