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 37137 - Creation package with default name can duplicate files.
Summary: Creation package with default name can duplicate files.
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jan Pokorsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-11 09:31 UTC by ehucka
Modified: 2007-09-26 09:14 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 ehucka 2003-11-11 09:31:27 UTC
Description: 


Name: amR10106			Date: 10/29/2003


Build: M4 on Win2K
Attempt to create package with default name leads to content duplication of
previously created "pkg" package, but not to creation of "pkg_1" package.

Steps to reproduce:
1. Mount empty local filesystem.
2. Invoke New->Java Package on filesystem node and press Finish.
3. Invoke New->Java Class on pkg node and press Finish.
4. Repeate step 2.
Result:
New class with name class_1 appears under "pkg" node.
Repeating of step 2 always duplicate the number of files under the package.

======================================================================

A comment.
Comment 1 ehucka 2003-11-11 09:42:58 UTC
I've recognized that it is not only in default named package.

Steps to reproduce:

1. go to a filesystem and create package a.b.c
2. go to this package and create a class into it e.g. String
3. go to a filesystem and try to create package a.b.c once more

Result: all classes in a.b.c will be duplicated - String_1

In addition the new wizard detects first level package name duplicity
but doesn't detect second and others.
Comment 2 Jan Pokorsky 2003-11-13 14:57:07 UTC
There is an insufficient validation in JavaPackageIterator.
Comment 3 Jan Pokorsky 2003-11-14 12:22:17 UTC
Fixed in
/cvs/java/src/org/netbeans/modules/java/ui/wizard/JavaPackageIterator.java
new revision: 1.10; previous revision: 1.9
/cvs/java/src/org/netbeans/modules/java/ui/wizard/Bundle.properties
new revision: 1.24; previous revision: 1.23
Comment 4 ehucka 2003-11-25 14:00:08 UTC
Verified with 200311241900.
Comment 5 Quality Engineering 2007-09-20 09:51:03 UTC
Reorganization of java component