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 84706 - 'Change Order...' leads to IndexOutOfBoundsException
Summary: 'Change Order...' leads to IndexOutOfBoundsException
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Tools (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P1 blocker (vote)
Assignee: Nathan Fiedler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-12 15:25 UTC by Andrei Chistiakov
Modified: 2006-09-14 11:08 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
newXmlSchema1.xsd (618 bytes, text/xml)
2006-09-12 15:26 UTC, Andrei Chistiakov
Details
newXmlSchema2.xsd (500 bytes, text/xml)
2006-09-12 15:27 UTC, Andrei Chistiakov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Chistiakov 2006-09-12 15:25:53 UTC
Reproduced in build 060911_2 (JDK 1.6 Beta 2)

To reproduce the bug:

- put both attached schemas into the same folder of a project;
- open the project;
- open newXmlSchema1;
- select 'Referenced Schemas|redefine' in column view;
- invoke 'Change Order...' popup menu command;
- move 'CT0' item one level down in the list and push OK.
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
	at java.util.ArrayList.RangeCheck(ArrayList.java:547)
	at java.util.ArrayList.set(ArrayList.java:337)
	at
org.netbeans.modules.xml.schema.ui.nodes.RefreshableChildren$IndexSupport.reorder(RefreshableChildren.java:141)
	at org.openide.nodes.IndexedCustomizer.doClose(IndexedCustomizer.java:295)
	at org.openide.nodes.TMUtil$IndexC.run(TMUtil.java:334)
	at org.openide.nodes.TMUtil.exec(TMUtil.java:192)
	at org.openide.nodes.TMUtil.showIndexedCustomizer(TMUtil.java:140)
	at org.openide.nodes.Index$Support.showIndexedCustomizer(Index.java:271)
	at org.openide.nodes.Index$Support.reorder(Index.java:261)
	at
org.netbeans.modules.xml.schema.ui.nodes.RefreshableChildren.reorder(RefreshableChildren.java:89)
	at org.openide.actions.ReorderAction.performAction(ReorderAction.java:57)
	at org.openide.util.actions.NodeAction$DelegateAction$1.run(NodeAction.java:537)
	at
org.netbeans.modules.openide.util.ActionsBridge.doPerformAction(ActionsBridge.java:53)
	at
org.openide.util.actions.NodeAction$DelegateAction.actionPerformed(NodeAction.java:533)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:377)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:232)
	at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
	at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1157)
	at
javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1198)
	at java.awt.Component.processMouseEvent(Component.java:5999)
	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:3912)
	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)
Comment 1 Andrei Chistiakov 2006-09-12 15:26:41 UTC
Created attachment 33829 [details]
newXmlSchema1.xsd
Comment 2 Andrei Chistiakov 2006-09-12 15:27:01 UTC
Created attachment 33830 [details]
newXmlSchema2.xsd
Comment 3 Nathan Fiedler 2006-09-12 20:13:20 UTC
Fixed in release55 branch (reordering is now disallowed for all components that
have less than two children).

schema/schemaui/src/org/netbeans/modules/xml/schema/ui/nodes/SchemaComponentNode.java;
new revision: 1.1.2.67; previous revision: 1.1.2.66
Comment 4 Andrei Chistiakov 2006-09-14 11:08:31 UTC
Verified in build 060913.