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 - IllegalStateException on customizing of a simple type definition
Summary: IllegalStateException on customizing of a simple type definition
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: bhate
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-11 15:25 UTC by Andrei Chistiakov
Modified: 2006-09-14 10:52 UTC (History)
3 users (show)

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 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.