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.
Tested with NB20040722 & JDK1.4.2_05 Steps to reproduce: 1. Create a new project. 2. Create a new package (org.netbeans.package1) 3. Create many class in that package (Class1, Class2, Class3). 4. Create another package (org.netbeans.package2) 5. Right-click on that package and select delete. 6. Confirm his deletion 7. NB deletes package2 but also package1 and his contents.
It's the third time it happens. The first time was with NB20040711. The second time was with NB20040719. And now. But this time, I have steps to reproduce.
I just tried following Vincent's instructions exactly (using a j2seproject, which he did not specify) and failed to reproduce any problem. org.netbeans.package2 was deleted as expected, and org.netbeans.package1 was left untouched. 040722, 1.4.2_04, Linux. Maybe Windows-specific? Vincent, if you have built NB dev sources on your computer, you might try ant -f java/project/build.xml test which ought to pass. However the unit test is not really adequate; tests what happens when the FileObject is deleted, but does not test PackageNode.destroy at all. Also PackageNode.destroy()'s use of parent.isEmpty() when deleting empty parent packages is certainly wrong, since isEmpty() will return true if there are (empty) subpackages, meaning that if you have an *empty* package org.netbeans.package1 and (an empty or nonempty) org.netbeans.package2, and you delete package2, package1 will be deleted as well, which is rather surprising and certainly a bug. Not data loss, however - should not happen if there are any files in package1.
I am sorry, but I confirm the issue. Sorry Jesse. I am not building from source. I always download Installer. Simpler for me. And my packages were not empty.
*** This issue has been marked as a duplicate of 46399 ***
I filed issue #46524 for the relatively minor problem about deleting empty siblings.
Duplicate. Verified->Closed.