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 63443 - [Layer] FNFE on opening <file> for which external contents were deleted
Summary: [Layer] FNFE on opening <file> for which external contents were deleted
Status: VERIFIED DUPLICATE of bug 72541
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 5.x
Hardware: All All
: P4 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-31 15:36 UTC by pzajac
Modified: 2006-10-23 16:39 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
exception (2.61 KB, text/plain)
2005-08-31 15:37 UTC, pzajac
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pzajac 2005-08-31 15:36:04 UTC
[200508301800]
1) Add a file to layer.xml 
2) Edit the file -> save it
3) delete the file from file system
4) Try open the file from layer.xml 

The FileNotFound exception was thrown
Comment 1 pzajac 2005-08-31 15:37:00 UTC
Created attachment 24421 [details]
exception
Comment 2 Jesse Glick 2005-08-31 16:28:45 UTC
Uh... right. Because when you deleted the disk file from your project, you
rendered the layer invalid. It would throw the same FNFE in the actual app if
you tried to run it.

I could try to listen in case the user deletes a project file which corresponds
to a layer file and quietly remove the url="..." attribute, perhaps, or delete
the whole <file>. Not sure if that's what you would expect to happen. Getting
into refactoring territory.
Comment 3 pzajac 2005-08-31 16:57:52 UTC
You don't need to delete the file. Add record to layer xml:
           <file name="sadasd" url="aaa/bbb"/>

After that try open the file in layer.xml view. The same exception was thrown. 


 
Comment 4 Jesse Glick 2005-08-31 17:14:19 UTC
Yes, well adding a file specifying a URL which does not exist is also an error
which would throw a FNFE at runtime. So don't do that.

I can add a localized annotation to the FNFE, I guess, which would explain why
the user made a mistake and how to correct it.
Comment 5 pzajac 2005-08-31 17:17:50 UTC
Yes, it is good idea to add the localized message.
Comment 6 pzajac 2005-10-18 17:05:28 UTC
Broken links is shown in layer view for file with invalid url. nice:-). 
Comment 7 Jesse Glick 2005-10-21 01:01:57 UTC
Uh, nothing was fixed since you reported this. Maybe you were thinking of
*.shadow files.
Comment 8 Jesse Glick 2006-02-10 18:39:36 UTC

*** This issue has been marked as a duplicate of 72541 ***
Comment 9 pzajac 2006-02-13 13:44:34 UTC
verified