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.
Reproduced in build 060828. To reproduce the bug: - create a new schema; - switch to Source view; - add SimpleType '<xsd:simpleType></xsd:simpleType>'; - switch to Schema view; - click on Simple Type node. NPE: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 at java.util.ArrayList.RangeCheck(ArrayList.java:547) at java.util.ArrayList.get(ArrayList.java:322) at org.netbeans.modules.xml.xam.ui.column.BasicColumnView.removeColumnsAfter(BasicColumnView.java:144) at org.netbeans.modules.xml.schema.ui.basic.SchemaColumnsView.removeColumnsAfter(SchemaColumnsView.java:354) at org.netbeans.modules.xml.schema.ui.basic.SchemaColumn.addDetailColumn(SchemaColumn.java:254) at org.netbeans.modules.xml.schema.ui.basic.SchemaColumn.propertyChange(SchemaColumn.java:211) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276) at org.openide.explorer.ExplorerManager$2.run(ExplorerManager.java:776) at org.openide.util.Mutex.doEvent(Mutex.java:1158) at org.openide.util.Mutex.readAccess(Mutex.java:284) at org.openide.explorer.ExplorerManager.fireInAWT(ExplorerManager.java:773) at org.openide.explorer.ExplorerManager.access$600(ExplorerManager.java:58) at org.openide.explorer.ExplorerManager$1AtomicSetSelectedNodes.updateSelection(ExplorerManager.java:248) at org.openide.explorer.ExplorerManager$1AtomicSetSelectedNodes.run(ExplorerManager.java:253) at org.openide.util.Mutex.readAccess(Mutex.java:293) at org.openide.explorer.ExplorerManager.setSelectedNodes(ExplorerManager.java:259) at org.openide.explorer.view.ListView.selectionChanged(ListView.java:406) at org.openide.explorer.view.ListView$Listener.valueChanged(ListView.java:1198) at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:187) at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:167) at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:214) at javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:408) at javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:417) at javax.swing.DefaultListSelectionModel.setSelectionInterval(DefaultListSelectionModel.java:441) at javax.swing.JList.setSelectionInterval(JList.java:1962) at javax.swing.plaf.basic.BasicListUI$Handler.adjustSelection(BasicListUI.java:2704) at javax.swing.plaf.basic.BasicListUI$Handler.mousePressed(BasicListUI.java:2667) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:221) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:221) at java.awt.Component.processMouseEvent(Component.java:5996) at javax.swing.JComponent.processMouseEvent(JComponent.java:3240) at java.awt.Component.processEvent(Component.java:5764) at java.awt.Container.processEvent(Container.java:1984) at java.awt.Component.dispatchEventImpl(Component.java:4407) at java.awt.Container.dispatchEventImpl(Container.java:2042) at java.awt.Component.dispatchEvent(Component.java:4237) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4248) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3909) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3842) at java.awt.Container.dispatchEventImpl(Container.java:2028) at java.awt.Window.dispatchEventImpl(Window.java:2405) at java.awt.Component.dispatchEvent(Component.java:4237) [catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:600) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160) at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
We need to check for simpletype definition to be restriction before trying add the enum children.
Verified in build060831.