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 42091

Summary: DataShadow's to disk files no longer work w/o mounted filesystems
Product: platform Reporter: Jesse Glick <jglick>
Component: Data SystemsAssignee: David Konecny <dkonecny>
Status: CLOSED FIXED    
Severity: blocker CC: jtulach, rmatous
Priority: P2 Keywords: API, REGRESSION
Version: 4.x   
Hardware: PC   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: Example exception, after copying /space/src/nb_all/openide/execution/deprecated/.cvsignore and pasting to Menu/&Misc in the system filesystem
Resulting $userdir/config/Menu/&Misc/.cvsignore.shadow

Description Jesse Glick 2004-04-16 22:16:58 UTC
If you copy a (disk) file and paste it (into some
folder) as a "link" (DataShadow), you will just
get an exception and the link will be broken. DS
tries to store the original file by filesystem
name and path, which of course does not work now
since there are no mounted disk filesystems. It
needs to use a URL (e.g.) instead.

Links to files on the system filesystem still work.
Comment 1 Jesse Glick 2004-04-16 22:18:14 UTC
Created attachment 14435 [details]
Example exception, after copying /space/src/nb_all/openide/execution/deprecated/.cvsignore and pasting to Menu/&Misc in the system filesystem
Comment 2 Jesse Glick 2004-04-16 22:19:12 UTC
Created attachment 14436 [details]
Resulting $userdir/config/Menu/&Misc/.cvsignore.shadow
Comment 3 Jesse Glick 2004-05-02 18:33:45 UTC
*** Issue 42690 has been marked as a duplicate of this issue. ***
Comment 4 Jesse Glick 2004-05-02 18:40:59 UTC
Suggest that it be possible to use a URL rather than a String for the
'originalFile' attr (in which case the 'originalFileSystem' attr would
be illegal); to be resolved using URLMapper in DataShadow.read; and
that DataShadow.writeOriginal create only the new syntax (use
FileObject.getURL).
Comment 5 David Konecny 2004-05-06 14:13:58 UTC
*** Issue 42840 has been marked as a duplicate of this issue. ***
Comment 6 David Konecny 2004-05-06 16:45:29 UTC
*** Issue 42461 has been marked as a duplicate of this issue. ***
Comment 7 David Konecny 2004-05-12 10:59:12 UTC
FYI:
It was easy to fix, but then I had problems with unit tests testing
"sloweness" ob DataShadows. That took me lot of time and result is
filed as issue 43141. It is not serious issue because IMO it is not
very common usecase. It was just used that way from the test which was
creating hundreds of shadow in one folder which each must be assigned
unique filename. I changed test to create DataShadow with unique name
and do not depend on FileUtil.findFreeFileName.
Comment 8 David Konecny 2004-05-12 11:26:40 UTC
Fixed in:
Checking in openide-spec-vers.properties;
new revision: 1.143; previous revision: 1.142
Checking in api/doc/changes/apichanges.xml;
new revision: 1.199; previous revision: 1.198
Checking in loaders/src/org/openide/loaders/BrokenDataShadow.java;
new revision: 1.9; previous revision: 1.8
Checking in loaders/src/org/openide/loaders/DataShadow.java;
new revision: 1.10; previous revision: 1.9
Checking in loaders/src/org/openide/loaders/ShadowChangeAdapter.java;
new revision: 1.4; previous revision: 1.3
Checking in
test/unit/src/org/openide/loaders/DataShadowBrokenSlownessTest.java;
new revision: 1.2; previous revision: 1.1
Checking in
test/unit/src/org/openide/loaders/DataShadowSlowness39981Test.java;
new revision: 1.2; previous revision: 1.1
Checking in test/unit/src/org/openide/loaders/DataShadowTest.java;
new revision: 1.7; previous revision: 1.6
Comment 9 David Konecny 2004-05-12 11:27:41 UTC
Yarda, could you please test the fix in your Favorites modules and
reopen if there are any problems? Thanx.
Comment 10 Zdenek Konecny 2005-08-02 10:50:09 UTC
Closed, too old