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.
Originally mentioned in issue #46510. Create an empty j2seproject and packages "a.b" and "a.c". Delete a.b. a.c is removed as well, which doesn't make any sense. (a.c is not removed if there are any files in it.) Problem is in misuse of isEmpty to determine whether to delete the next parent package in PackageNode.destroy; should only delete the parent if it is really empty, i.e. getChildren().length == 0. Also PackageViewTest does not cover PackageNode.destroy at all, which is a serious omission.
IMO this bug should be fixed to promo-D. It's really serious misbehavior when deleting one package deletes also another (sibling) package even when it's empty.
Should be fixed. (not (ab)using isEmpty() ) Testcase added. Checking in project/src/org/netbeans/spi/java/project/support/ui/PackageViewChildren.java; /cvs/java/project/src/org/netbeans/spi/java/project/support/ui/PackageViewChildren.java,v <-- PackageViewChildren.javanew revision: 1.22; previous revision: 1.21 done Processing log script arguments... More commits to come... Checking in project/test/unit/src/org/netbeans/spi/java/project/support/ui/PackageViewTest.java; /cvs/java/project/test/unit/src/org/netbeans/spi/java/project/support/ui/PackageViewTest.java,v <-- PackageViewTest.java new revision: 1.8; previous revision: 1.7 done
*** Issue 46799 has been marked as a duplicate of this issue. ***