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 96220 - WSDL editor: editing inline schema produces NPE related to code-completion?
Summary: WSDL editor: editing inline schema produces NPE related to code-completion?
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Tools (show other bugs)
Version: 5.x
Hardware: All Windows XP
: P2 blocker (vote)
Assignee: Samaresh Panda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-21 20:57 UTC by jlautz
Modified: 2007-03-06 11:49 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
WSDL file (3.73 KB, application/octet-stream)
2007-02-21 20:59 UTC, jlautz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jlautz 2007-02-21 20:57:16 UTC
Seen on Windows XP with EP Gavotte 070220_4 and JDK 1.5.0_10:

1. Open the attached WSDL file (from issue 91296) in the WSDL source editor.
2. Select all of the line 37 (the one with attributeFormDefault), and delete to
remove the line.
3. At the end of line 36, enter the "/" character.
=> NPE with the following stack trace appears:

java.lang.NullPointerException
	at
org.netbeans.modules.xml.schema.completion.util.CompletionUtil.findChildElement(CompletionUtil.java:332)
	at
org.netbeans.modules.xml.schema.completion.util.CompletionUtil.findAXIElementAtContext(CompletionUtil.java:320)
	at
org.netbeans.modules.xml.schema.completion.util.CompletionUtil.getAttributes(CompletionUtil.java:185)
	at
org.netbeans.modules.xml.schema.completion.CompletionQuery.getCompletionItems(CompletionQuery.java:88)
	at
org.netbeans.modules.xml.schema.completion.CompletionQuery.query(CompletionQuery.java:74)
	at
org.netbeans.spi.editor.completion.support.AsyncCompletionTask.run(AsyncCompletionTask.java:195)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:499)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:932)
Comment 1 jlautz 2007-02-21 20:59:31 UTC
Created attachment 38787 [details]
WSDL file
Comment 2 Samaresh Panda 2007-02-21 22:44:15 UTC
Check for not null. It is a low-risk fix.
Comment 3 Alexei Mokeev 2007-02-22 10:31:17 UTC
It is P2 issue filed after bug cut-off date. I assume that it is not a STOPPER
for Beta. If you disagree then rise priority to P1 and remove waiver keyword. 
Comment 4 Samaresh Panda 2007-02-25 21:52:10 UTC
Adding safeguards:
/cvs/xml/schema/completion/src/org/netbeans/modules/xml/schema/completion/util/CompletionContextImpl.java,v
 <--  CompletionContextImpl.java
new revision: 1.1.2.15; previous revision: 1.1.2.14
/cvs/xml/schema/completion/src/org/netbeans/modules/xml/schema/completion/util/CompletionUtil.java,v
 <--  CompletionUtil.java
new revision: 1.1.2.21.6.11; previous revision: 1.1.2.21.6.10
/cvs/xml/schema/completion/src/org/netbeans/modules/xml/schema/completion/CompletionQuery.java,v
 <--  CompletionQuery.java
new revision: 1.1.2.5.22.7; previous revision: 1.1.2.5.22.6
Comment 5 Samaresh Panda 2007-02-25 21:57:32 UTC
Fix integrated.
Comment 6 htt 2007-03-01 16:55:03 UTC
Verified in 070301_5.
Comment 7 Alexei Mokeev 2007-03-06 11:49:10 UTC
Removed EP551_WAIVER_APPROVED