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 46450 - Renaming encapsulated packages - old package name left (possible data lost)
Summary: Renaming encapsulated packages - old package name left (possible data lost)
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 4.x
Hardware: All All
: P1 blocker (vote)
Assignee: Petr Hrebejk
URL:
Keywords:
Depends on: 46399
Blocks:
  Show dependency tree
 
Reported: 2004-07-22 15:54 UTC by zikmund
Modified: 2006-03-24 09:51 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description zikmund 2004-07-22 15:54:11 UTC
Build 200407201800

1) Have 2 encapsulated packages with 2 classes:
   com.module.AClass
   com.module.model.BClass
2) Rename package com.module to com.company.module
3) Rename package com.module.model to
com.company.module.model
4) ERROR:
package named "com.module" is viewed in Projects
window.
5) Delete com.module package
6) ERROR:
packages com.company.* are deleted as well without
any confirmation dialog!

Notice: The second error is connected to issue
#46447 (no confirmation when deleting package).
These 2 bugs together are potential data lost.
Comment 1 Jan Becicka 2004-07-22 16:20:06 UTC
Refactoring part of the issue fixed. /...4) ERROR: package named
"com.module" is viewed in Projects window./

Checking in MoveClassRefactoring.java;
/cvs/refactoring/src/org/netbeans/modules/refactoring/api/MoveClassRefactoring.java,v
 <--  MoveClassRefactoring.java
new revision: 1.15; previous revision: 1.14
done

But delete action still removes much more than user selected.
Comment 2 zikmund 2004-07-22 16:33:23 UTC
The delete action part of bug is (hopefully) covered by fix of issue
#46399. I'll check it in next daily builds.
Comment 3 Jan Becicka 2004-07-22 16:45:08 UTC
OK
Comment 4 zikmund 2004-07-28 11:05:52 UTC
Verified.