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 50776

Summary: NPE when context element is incomplete in project.xml
Product: projects Reporter: miks <miks>
Component: AntAssignee: David Konecny <dkonecny>
Status: CLOSED WONTFIX    
Severity: blocker    
Priority: P3    
Version: 4.x   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 42682    
Attachments: the log of the error when it happens
the project which the <context> element is incomplete and make the problem

Description miks 2004-10-24 01:18:27 UTC
In free form project, when an "action" element 
is added in "ide-action" and the action contains 
the "context" element that is either empty or 
not complete (missing the arity for example) 
then an NPE is thrown when right clicking on a 
source file in the project view.
Comment 1 David Konecny 2004-10-25 09:36:14 UTC
I'm not able to reproduce it. Feel free to reopen, but attach (use
Create a new attachement link above) the NPE and if possible
project.xml file or step by step info how to reproduce it. Perhaps it
is related to a concrete ide-action you customize? When saving such a
project.xml you should get error that it does not validate against XML
schema, right?
Comment 2 miks 2004-10-25 21:20:19 UTC
Please find attached a project.xml making the problem
Comment 3 miks 2004-10-25 21:22:39 UTC
Created attachment 18499 [details]
the log of the error when it happens
Comment 4 miks 2004-10-25 21:23:52 UTC
Created attachment 18500 [details]
the project which the <context> element is incomplete and make the problem
Comment 5 David Konecny 2004-10-27 11:06:01 UTC
I see, you are using beta2. Validation of project.xml was added after
beta2. When you open/save your project in latest trunk build you will
get an error saying that your project.xml contains error. That will
help you identify the problem and fix it.
Comment 6 Jesse Glick 2004-10-27 12:30:17 UTC
Ideally you would want the validation *before* you save (or refuse to
reload an invalid project.xml), so that all code can expect it is
reading valid XML and omit cumbersome error handling for such cases.
See issue #42686.
Comment 7 Marian Mirilovic 2005-07-12 10:02:02 UTC
closed