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 27872 - Directory names ending in dots are not recognized as folders
Summary: Directory names ending in dots are not recognized as folders
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 3.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: rmatous
URL:
Keywords:
Depends on:
Blocks: 27648
  Show dependency tree
 
Reported: 2002-10-08 21:53 UTC by Jesse Glick
Modified: 2008-12-22 23:21 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IllegalArgumentException after creation folder "ll." (3.03 KB, text/plain)
2002-10-09 12:41 UTC, Marian Mirilovic
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2002-10-08 21:53:21 UTC
Pretty trivial to reproduce, at least on Linux.
Start the IDE. Now type

$ mkdir $userdir/sampledir/foo.

and choose Refresh Folder on $userdir/sampledir in
the Explorer. A DefaultDataObject appears with the
display name "foo.". Bean Browser shows that the
FileObject is marked as a file, not a directory,
and further that getPath() is "foo", not "foo." as
it should be.

dstrupl's commit 1.57 to FileObject is probably
responsible. This is a regression.

I strongly recommend that Filesystems API unit
tests be written to cover every interesting
situation involving dots in filenames, since this
area of the code is historically very buggy.

Also consider having AbstractFolder.getPath just
use a precomputed string. If you ever look at
profiler results you will see getPath (or
previously getPackageNameExt) being called over
and over and consuming a lot of time. I would
suggest the path just be computed and stored in
the file object's constructor, since it is used so
often.
Comment 1 Marian Mirilovic 2002-10-09 12:39:11 UTC
It is reproducible in [nb_dev](20021009), IMHO it isn't reproducible
in the sierra fcs.

If you try to create folder "xx." by the IDE (New Folder)
IllegalArgumentException arise (see attachment) - only
[nb_dev](20021009).
Comment 2 Marian Mirilovic 2002-10-09 12:41:39 UTC
Created attachment 7621 [details]
IllegalArgumentException after creation folder "ll."
Comment 3 rmatous 2002-10-09 16:39:49 UTC
Use in java application folders ending in dots is not good idea.
Because e.g. on Windows there is not possible to create file/folder
ending in dots at all. Fixed in trunk with tests for xtest harness.
Comment 4 pzajac 2002-10-16 10:30:40 UTC
verified[200210160100].