This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 53015

Summary: Class Rename Should Delete Old Class Files.
Product: java Reporter: William Leonard <bleonard>
Component: UnsupportedAssignee: issues@java <issues>
Status: RESOLVED WONTFIX    
Severity: blocker    
Priority: P3    
Version: 4.x   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:

Description William Leonard 2005-01-05 22:05:36 UTC
When renaming a class, the old <filename>.class
files should be deleted. I ran into a frustrating
problem where I had a <ClassName>Test.java, which
I renamed because I was going to create a JUnit
test which would have the same name. The JUnit
test, being in the same package (but different
directory) failed with "No tests found in
<ClassName>Test". It took me awhile to figure out
that there was still and old <ClassName>Test.class
laying around in the build/classes directory. My
first thought was that something was wrong with
the JUnit execution, and others will likely run
into the same problem.
Comment 1 Jan Becicka 2005-01-07 15:49:17 UTC
Not sure, what is the right module for this issue.
Anyway, refactoring just does DataObject.rename(). Project system
takes care of .class files. Can you evaluate this issue? Thanks
Comment 2 Tomas Zezula 2005-01-16 10:58:15 UTC
The clean up after refactoring should be done by refactoring itself,
otherwise it would be necessary for all project types to depend on the
refactoring module.
Comment 3 Jan Becicka 2005-01-17 14:34:02 UTC
This should be handled probably in JDO.handleRename()
Comment 4 Tomas Zezula 2005-01-28 11:05:39 UTC
The question is if we want to do it at all, the user is able to do the
real clean (probably WANTFIX)
Comment 5 Jan Becicka 2005-01-28 12:20:35 UTC
I agree with Tomas. IDE will never ensure, that all classes are
up-to-date unless user do clean-build. We are sorry, but this issue is
WONTFIX.
Comment 6 Jan Becicka 2005-10-06 07:31:22 UTC
*** Issue 65981 has been marked as a duplicate of this issue. ***
Comment 7 Jan Becicka 2005-10-26 09:03:10 UTC
*** Issue 67550 has been marked as a duplicate of this issue. ***