Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 291457

Summary: Refactoring doesn't work when renaming a class
Product: [Eclipse Project] JDT Reporter: Ayushman Jain <amj87.iitr>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3    
Version: 3.6   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug

Description Ayushman Jain CLA 2009-10-06 07:05:24 EDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3
Build Identifier:  I20090611-1540

If a compilation unit already exists, and one comments out the public class and tries to rename another class to have the same name as the earlier public class, Refactor>rename doesn't work

Reproducible: Always

Steps to Reproduce:
1. Clazz.java
public class Clazz{
}
class A{
}

Press save

Now change Clazz.java to

/*public class Clazz{
} */

public class A{
}

and select A->Refactor>Rename. Enter the new name as Clazz, and hit enter. You get a fatal error, "Compilation unit Clazz.java already exists"!
Comment 1 Eclipse Genie CLA 2020-02-18 13:33:09 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. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. 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.