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 66816 - invalid layer.xml - NPE on adding element
Summary: invalid layer.xml - NPE on adding element
Status: VERIFIED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-14 15:47 UTC by pzajac
Modified: 2005-12-13 10:47 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
exception (3.26 KB, text/plain)
2005-10-14 15:49 UTC, pzajac
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pzajac 2005-10-14 15:47:15 UTC
[200510131800]
I write invalid xml attribute to file tax in layer.xml

<file nam="file"/>

The NPE is thrown on adding File or or folder from context menu of <this layer>
view.  

It should be better to check if the layer is valid before the adding new
file/folder dialog is shown.
Comment 1 pzajac 2005-10-14 15:49:33 UTC
Created attachment 25957 [details]
exception
Comment 2 Jesse Glick 2005-12-11 00:10:20 UTC
Can just ignore malformed elements like that.
Comment 3 Jesse Glick 2005-12-11 01:47:36 UTC
committed     Up-To-Date  1.16       
apisupport/project/src/org/netbeans/modules/apisupport/project/layers/WritableXMLFileSystem.java
Comment 4 pzajac 2005-12-13 10:47:47 UTC
Yes, it is much better than throwing NPE.