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 81517 - IllegalArgumentException on reverting maxExclusive to its default value
Summary: IllegalArgumentException on reverting maxExclusive to its default value
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-07-31 17:23 UTC by Andrei Chistiakov
Modified: 2006-08-16 12:50 UTC (History)
4 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-07-31 17:23:56 UTC
Reproduced in build 060730.

To reproduce the bug:

- create a new schema;
- add a new element of inline simple type;
- customize the type so it would restrict integer;
- in Properties set maxExclusive value to 10;
- invoke 'Restore default value' on this property.

java.lang.IllegalArgumentException: child already in children list
	at
org.netbeans.modules.xml.xam.AbstractComponent.checkNullOrDuplicateChild(AbstractComponent.java:297)
	at
org.netbeans.modules.xml.xam.AbstractComponent.appendChild(AbstractComponent.java:303)
	at
org.netbeans.modules.xml.schema.model.impl.CommonSimpleRestrictionImpl.removeMaxExclusive(CommonSimpleRestrictionImpl.java:194)
	at
org.netbeans.modules.xml.schema.model.impl.xdm.SyncUpdateVisitor.visit(SyncUpdateVisitor.java:1070)
	at
org.netbeans.modules.xml.schema.model.impl.MaxExclusiveImpl.accept(MaxExclusiveImpl.java:52)
	at
org.netbeans.modules.xml.schema.model.impl.xdm.SyncUpdateVisitor.update(SyncUpdateVisitor.java:60)
	at
org.netbeans.modules.xml.schema.model.impl.xdm.SyncUpdateVisitor.update(SyncUpdateVisitor.java:48)
	at
org.netbeans.modules.xml.schema.model.impl.xdm.SyncUpdateVisitor.update(SyncUpdateVisitor.java:31)
	at
org.netbeans.modules.xml.xam.dom.AbstractDocumentModel.removeChildComponent(AbstractDocumentModel.java:289)
	at
org.netbeans.modules.xml.schema.ui.nodes.schema.properties.AdvancedFacetProperty.setValue(AdvancedFacetProperty.java:77)
	at
org.netbeans.modules.xml.schema.ui.nodes.schema.properties.BaseSchemaProperty.restoreDefaultValue(BaseSchemaProperty.java:177)
	at
org.netbeans.modules.xml.schema.ui.nodes.SchemaModelFlushWrapper.restoreDefaultValue(SchemaModelFlushWrapper.java:68)
	at
org.openide.explorer.propertysheet.PropertySheet$MutableAction.actionPerformed(PropertySheet.java:1177)
	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 bhate 2006-07-31 19:49:12 UTC
The fix is in schema model API.
The model incorrectly adds maxexclusive instead of deleting it when
removeMaxExclusive is called.
Fix is checked into release55 branch.
Comment 2 bhate 2006-07-31 20:15:31 UTC
This bug is been there in model for a long time.
It got exposed in UI on property sheet before JavaOne EA.
The fix in model is a one line change and is already checked into release55.
There is no fix possible in UI, workaround can be implemented but will require
lot of work.
requesting for waiver.
Comment 3 bhate 2006-08-04 23:11:25 UTC
This issue is fixed in release55 branch.
Comment 4 Andrei Chistiakov 2006-08-16 12:50:11 UTC
Verified in build 060815_1.