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.
[dev-20040907, JDK 1.5.0 RC] 1) Create empty package org.pkg in java application project 2) Invoke Rename on that package and change the name to: 'org.pkglibrary' The result is 'org.pkg.ibrary' 3) Invoke Rename again and change the name again to: 'org.pkglibrary' The result is 'org.pkg'
Reproducible for me. More simply, renaming "org.pkg" to "org.pakg" works but renaming to "org.pkg2" does not. I think PackageNode.setName is buggy. In particular, the calculation of 'index' vs. 'i' looks suspicious. What happens if name.startsWith(oldName) or vice versa? Need to expand the unit test to include these border cases.
Sorry, thats my fault I forgot about this while writing the unit test. I am going to extend the test and fix it.
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.java new revision: 1.41; previous revision: 1.40 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.18; previous revision: 1.17 done
Fixed in trunk.
Verified in trunk, custom 20040909.
Integrated into release40_beta2 Checking in 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.java new revision: 1.39.4.2; previous revision: 1.39.4.1
Verified in pre-beta2-200409210530.