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 75881 - NPE on adding xsd:restriction from Source
Summary: NPE on adding xsd:restriction from Source
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Text-Edit (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: Marek Fukala
URL:
Keywords:
: 71274 75130 75584 76330 77942 80670 81505 81543 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-05-03 18:57 UTC by Samaresh Panda
Modified: 2007-09-25 01:33 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Samaresh Panda 2006-05-03 18:57:37 UTC
This bug was originally discovered in NB Enterprise Pack. See
http://bt2ws.central.sun.com/CrPrint?id=6421161.

Steps to reproduce:

- create a new schema;
- from Source add Simple Type;
- add restriction to Simple Type '<xsd:restriction> <';
- Note, NPE will be thrown as soon as you type-in '<' after <xsd:restriction>
The following exception is thrown:

java.lang.NullPointerException
	at
org.netbeans.modules.xml.dtd.grammar.ContentModel$Choice.reset(ContentModel.java:438)
	at
org.netbeans.modules.xml.dtd.grammar.ContentModel$Sequence.reset(ContentModel.java:246)
	at
org.netbeans.modules.xml.dtd.grammar.ContentModel.whatCanFollow(ContentModel.java:132)
	at
org.netbeans.modules.xml.dtd.grammar.DTDGrammar.queryElements(DTDGrammar.java:176)
	at
org.netbeans.modules.xml.text.completion.XMLCompletionQuery.queryElements(XMLCompletionQuery.java:273)
	at
org.netbeans.modules.xml.text.completion.XMLCompletionQuery.query(XMLCompletionQuery.java:112)
	at
org.netbeans.modules.xml.text.completion.XMLCompletionProvider.queryImpl(XMLCompletionProvider.java:98)
	at
org.netbeans.modules.xml.text.completion.XMLCompletionProvider.access$000(XMLCompletionProvider.java:40)
	at
org.netbeans.modules.xml.text.completion.XMLCompletionProvider$Query.query(XMLCompletionProvider.java:76)
	at
org.netbeans.spi.editor.completion.support.AsyncCompletionTask.run(AsyncCompletionTask.java:189)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:493)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:926)
Comment 1 Marek Fukala 2006-05-19 12:41:28 UTC
*** Issue 75130 has been marked as a duplicate of this issue. ***
Comment 2 Marek Fukala 2006-05-31 17:53:27 UTC
This is happening just for particullar DTDs and elements. I'll fix it to 5.5,
but decreasing the priority.
Comment 3 Marek Fukala 2006-06-26 15:15:15 UTC
*** Issue 75584 has been marked as a duplicate of this issue. ***
Comment 4 Marek Fukala 2006-06-26 15:17:42 UTC
*** Issue 76330 has been marked as a duplicate of this issue. ***
Comment 5 Marek Fukala 2006-06-28 12:49:35 UTC
*** Issue 77942 has been marked as a duplicate of this issue. ***
Comment 6 Marek Fukala 2006-07-27 15:57:27 UTC
*** Issue 80670 has been marked as a duplicate of this issue. ***
Comment 7 Marek Fukala 2006-07-27 16:00:02 UTC
*** Issue 71274 has been marked as a duplicate of this issue. ***
Comment 8 Marek Fukala 2006-07-31 13:24:10 UTC
fixed

Checking in ContentModel.java;
/cvs/xml/core/src/org/netbeans/modules/xml/dtd/grammar/ContentModel.java,v  <--
 ContentModel.java
new revision: 1.13.70.2; previous revision: 1.13.70.1
done
Comment 9 Chris Webster 2006-07-31 16:26:37 UTC
*** Issue 81505 has been marked as a duplicate of this issue. ***
Comment 10 Chris Webster 2006-07-31 23:56:57 UTC
*** Issue 81543 has been marked as a duplicate of this issue. ***
Comment 11 Jindrich Sedek 2006-08-04 13:21:16 UTC
Verified NetBeans5.5Dev 200608040000