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 23158 - Wrong behavior when try to create folder with ended with ".class" name
Summary: Wrong behavior when try to create folder with ended with ".class" name
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: -FFJ-
Hardware: Sun Solaris
: P4 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-06 11:54 UTC by Alexei Mokeev
Modified: 2003-06-30 16:44 UTC (History)
2 users (show)

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 Alexei Mokeev 2002-05-06 11:54:57 UTC
Steps to reproduce:

1)Select some directory node in explorer
2)In popup menu select New->Folder
3)Type "something.class" in "Name:" field and
press "Finish" button

Look at Explorer window and notice, that 2 new
items appear:
1)Valid folder with name "something", that
contains nothing
2)Strange item with name "something", that
contains node "Error"

Look at filesystem, and notice that really 2 empty
directories created: "something" and
"something.class"

Such behavior is strange.
Comment 1 Alexei Mokeev 2002-05-06 13:29:23 UTC
Well reproduced with FFJ4.0ee, 020501 build on Solaris 8.
Comment 2 _ ttran 2002-05-09 10:08:10 UTC
Radek, please take care of this issue
Comment 3 rmatous 2002-06-14 16:37:14 UTC
Thre are two problems: 
1/ there is expected that DataObject.getName is adequate name for
folder. Impl. of DataObject.getName is getPrimaryFile.getName, which
is OK but its not name of folder . Name of folder must be considered
as getPrimaryFile.getNameExt.

2/Clazz module resolves *.class also for folders

So, reassigned to DataSystems for next evaluation.
Comment 4 phamernik 2002-06-19 10:24:41 UTC
Jano, please comment this issue.

Should names with extension be allowed for folders?
Comment 5 Jesse Glick 2002-06-24 18:32:20 UTC
IMHO:

1. clazz module is at fault for recognizing the folder.

2. DataFolder.name should indeed be the same as primaryFile.nameExt.
Doesn't FileEntry.Folder already do this?
Comment 6 jrojcek 2002-06-27 08:52:13 UTC
Folder containing "." is valid folder name, right? It is not about
folder extension. So "something.class" is also valid folder name thus
should be created. This issue looks more like a (clazz module?) bug
than usability problem.
Comment 7 Jesse Glick 2002-06-27 14:39:34 UTC
I guess ClassDataLoader.findPrimaryFile should begin with:

if (fo.isFolder()) return null;
Comment 8 Tomas Hurka 2002-06-27 15:24:43 UTC
Jesse, you are right.
Comment 9 Tomas Hurka 2002-06-27 15:27:29 UTC
fixed in trunk.
Comment 10 Jan Becicka 2002-10-15 14:18:31 UTC
VERIFIED
Comment 11 Quality Engineering 2003-06-30 16:44:08 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.