Bug 134717

Summary: [reorg] ncomplete refactoring while moving internal class with public fields [refactoring]
Product: [Eclipse Project] JDT Reporter: Max Gilead <max.gilead>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3    
Version: 3.2   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: stalebug

Description Max Gilead CLA 2006-04-04 07:33:22 EDT
Eclipse performs incomplete efactoring while moving internal class with public fields.

// Foo1.java
public abstract class Foo1 {
  public static class Internal<T extends Enum<T>> {
    public static final String CONSTANT = "";
}}
// Foo2.java
public class Foo2 {}
// Bar.java
public class Bar {
  Bar() { System.out.println(Foo1.Internal.CONSTANT); }
}

When moving Foo1.Internal to Foo2 using Refactor->Move tool the internal class is moved correctly but Bar reference still points to Foo1.Internal.CONSTANT.

What's interesting is that if Foo1.Internal does not use generic features entire refactoring is performed correctly.

// Foo1.java -- works fine
public abstract class Foo1 {
  public static class Internal {
    public static final String CONSTANT = "";
}}
Comment 1 Philipe Mulet CLA 2006-04-04 07:35:52 EDT
Refactoring belongs to JDT/UI
Comment 2 Frederic Fusier CLA 2006-04-04 09:04:49 EDT
Note that search references to Foo1.Internal type reports correctly one match in Bar...
Comment 3 Eclipse Genie CLA 2020-06-24 15:15:17 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 4 Eclipse Genie CLA 2023-01-15 14:18:02 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.