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 168727 - NullPointerException at org.netbeans.modules.xml.schema.ui.nodes.categorized.customizer.SimpleTypeCustomizer.determineValidity
Summary: NullPointerException at org.netbeans.modules.xml.schema.ui.nodes.categorized....
Status: RESOLVED INCOMPLETE
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Tools (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@xml
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-17 08:26 UTC by twoelectric
Modified: 2009-10-04 15:13 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 153813


Attachments
stacktrace (8.53 KB, text/plain)
2009-07-17 08:26 UTC, twoelectric
Details

Note You need to log in before you can comment on or make changes to this bug.
Description twoelectric 2009-07-17 08:26:20 UTC
Build: NetBeans IDE Dev (Build 200906070201)
VM: Java HotSpot(TM) Client VM, 14.0-b16, Java(TM) SE Runtime Environment, 1.6.0_14-b08
OS: Windows Vista, 6.0, x86

Stacktrace: 
java.lang.NullPointerException<br/>
        at org.netbeans.modules.xml.schema.ui.nodes.categorized.customizer.SimpleTypeCustomizer.determineValidity(SimpleTypeCustomizer.java:453)<br/>
        at org.netbeans.modules.xml.schema.ui.nodes.categorized.customizer.SimpleTypeCustomizer.propertyChange(SimpleTypeCustomizer.java:427)<br/>
        at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)<br/>
        at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276)<br/>
        at java.awt.Component.firePropertyChange(Component.java:8128)<br/>
        at org.netbeans.modules.xml.schema.ui.basic.editors.SchemaComponentSelectionPanel.setCurrentSelection(SchemaComponentSelectionPanel.java:246)<br/>
Comment 1 twoelectric 2009-07-17 08:26:25 UTC
Created attachment 84874 [details]
stacktrace
Comment 2 Sergey Lunegov 2009-07-17 09:12:52 UTC
Please provide exact steps to reproduce the issue
Comment 3 sgtgarcia 2009-10-04 15:13:30 UTC
1) Create a very simple yet buggy XML schema:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://xml.netbeans.org/schema/test"
    xmlns:tns="http://xml.netbeans.org/schema/test"
    elementFormDefault="qualified">
    <xsd:simpleType name="test"/>
</xsd:schema>
2) Switch to "Schema" view and select Simple Type named "test"
3) Right click, "Properties"
4) Click on "Structure... Customize"
5) In the Base Type part, select an existing definition, let's say "string"
An NPE appears.

I guess the reason is because no Derivation Method is selected, because as soon as you select a "Restriction", you can
select the Base type from existing definition.