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 194735 - java.io.IOException: Use FileUtil.createData() instead! Due to "C:\"
Summary: java.io.IOException: Use FileUtil.createData() instead! Due to "C:\"
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Data Systems (show other bugs)
Version: 6.x
Hardware: All All
: P2 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-26 13:49 UTC by st3vie
Modified: 2011-02-03 10:19 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 176098


Attachments
stacktrace (2.18 KB, text/plain)
2011-01-26 13:49 UTC, st3vie
Details

Note You need to log in before you can comment on or make changes to this bug.
Description st3vie 2011-01-26 13:49:30 UTC
This issue was reported manually by st3vie.
It already has 2 duplicates 


Build: NetBeans IDE Dev (Build 201101230001)
VM: Java HotSpot(TM) Client VM, 17.1-b03, Java(TM) SE Runtime Environment, 1.6.0_22-b04
OS: Windows 7

User Comments:
st3vie: added a network mapped drive as a new location under "Favorites"

st3vie: trying to add the root of a network drive - W:\ in this case - to Favorites. When I use a directory on that drive, it works.




Stacktrace: 
java.io.IOException: Use FileUtil.createData() instead!
   at org.openide.filesystems.AbstractFileObject.createData(AbstractFileObject.java:447)
   at org.openide.filesystems.FileUtil.createData(FileUtil.java:940)
   at org.openide.filesystems.MultiFileObject.createData(MultiFileObject.java:1151)
   at org.openide.filesystems.FileUtil.createData(FileUtil.java:940)
   at org.openide.filesystems.MultiFileObject.createData(MultiFileObject.java:1151)
   at org.openide.loaders.DataShadow$2.run(DataShadow.java:348)
Comment 1 st3vie 2011-01-26 13:49:34 UTC
Created attachment 105367 [details]
stacktrace
Comment 2 Jaroslav Tulach 2011-01-27 16:19:27 UTC
I guess the name of the shadow that favorites try to create contains "/" or "\\". Such character shall be replaced by something more neutral. Like "_"...
Comment 3 Ondrej Vrabec 2011-01-27 18:20:19 UTC
This is probably caused by http://hg.netbeans.org/main/rev/e1169459c473 (fix for bug #192222). Filesystems used to return "C:" as the name for the hard-drive while now "C:\" (with the backslash at the end) is returned.
I agree it should be replaced with something else, but it's loaders' responsibility, not favorites', i do not specify the shadow's name, it is determined inside data systems.
I think the proper place is here: http://hg.netbeans.org/core-main/file/ba0fb1a16d66/openide.loaders/src/org/openide/loaders/DataShadow.java#l343
Comment 4 Jaroslav Tulach 2011-02-01 21:28:15 UTC
ergonomics#6f6f2ab093af
Comment 5 Quality Engineering 2011-02-03 05:53:52 UTC
Integrated into 'main-golden', will be available in build *201102030000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/6f6f2ab093af
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #194735: Remove \ from Window root names
Comment 6 st3vie 2011-02-03 09:02:57 UTC
I just tried the latest nightly build *201102030000* and this works now. Thanks!
Comment 7 Jaroslav Tulach 2011-02-03 10:19:46 UTC
Verified then!