Bug 50926 - Refactor:Rename fails on a static variable in a static block.
Summary: Refactor:Rename fails on a static variable in a static block.
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 M7   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-29 18:08 EST by Chris Hemp CLA
Modified: 2004-02-04 07:03 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Hemp CLA 2004-01-29 18:08:17 EST
Create a class with a static list.  Then add objects to this list in a static
block.  Now try to Refactor:Rename the list.  Once completed, the list reference
in the static block renames unchanged.  So in the example code below, when
RENAME is changed to RENAMED_STATIC_VAR, the RENAME references are not updated
to RENAMED_STATIC_VAR within the static {}.

------- Example code -------

import java.util.ArrayList;

class Rename {
   public static final ArrayList RENAME = new ArrayList();

   static {
      RENAME.add("object1");
      RENAME.add("object2");
   }
}
Comment 1 Jerome Lanneluc CLA 2004-01-30 04:46:50 EST
Which build are you using? This works for me with I20040129.
Comment 2 Jerome Lanneluc CLA 2004-02-04 07:03:27 EST
Please reopen if you have more details.