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 84616

Summary: IllegalStateException on customizing of a simple type definition
Product: xml Reporter: Andrei Chistiakov <ca-nb>
Component: Schema ToolsAssignee: bhate <bhate>
Status: VERIFIED FIXED    
Severity: blocker CC: htt, ivansidorkin, kozlov
Priority: P1    
Version: 5.x   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:

Description Andrei Chistiakov 2006-09-11 15:25:16 UTC
Reproduced in build 060910 (JDK 1.6 Beta 2)

To reproduce the bug:
- create a new schema;
- add a new global simple type. While adding, set 'Restriction' and 'Inline
definition' options, then push OK button;
- customize the simple type. In customizer select 'List' derivation method and
push OK.

java.lang.IllegalStateException: Cannot add a removed component, should use a
fresh or a copy component.
	at
org.netbeans.modules.xml.xam.AbstractComponent._appendChildQuietly(AbstractComponent.java:87)
	at
org.netbeans.modules.xml.xam.AbstractComponent.addChild(AbstractComponent.java:252)
	at
org.netbeans.modules.xml.xam.AbstractComponent.setChild(AbstractComponent.java:385)
	at
org.netbeans.modules.xml.xam.AbstractComponent.setChildAfter(AbstractComponent.java:363)
	at
org.netbeans.modules.xml.xam.AbstractComponent.setChild(AbstractComponent.java:358)
	at
org.netbeans.modules.xml.schema.model.impl.ListImpl.setInlineType(ListImpl.java:85)
	at
org.netbeans.modules.xml.schema.ui.nodes.categorized.customizer.SimpleTypeCustomizer.setModelType(SimpleTypeCustomizer.java:356)
	at
org.netbeans.modules.xml.schema.ui.nodes.categorized.customizer.SimpleTypeCustomizer.applyChanges(SimpleTypeCustomizer.java:91)
	at
org.netbeans.modules.xml.xam.ui.customizer.AbstractComponentCustomizer.apply(AbstractComponentCustomizer.java:66)
	at
org.netbeans.modules.xml.schema.ui.basic.UIUtilities$2.actionPerformed(UIUtilities.java:306)
...
Comment 1 bhate 2006-09-12 23:08:23 UTC
before setting the definition we must create a copy and set it.
Comment 2 Andrei Chistiakov 2006-09-14 10:52:30 UTC
Verified in build 060913.