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 79692 - NPE on undoing changes made via drag/drop
Summary: NPE on undoing changes made via drag/drop
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Model (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P1 blocker (vote)
Assignee: Ayub Khan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-04 13:43 UTC by Andrei Chistiakov
Modified: 2006-07-18 11:56 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-04 13:43:34 UTC
Reproduced in build 060703.

To reproduce the bug:
- create new PO schema;
- switch into the tree representation of schema view;
- expand Complex Types|PurchaseOrderType|sequence path in the tree;
- expand Complex Types|USAddress|sequence path in the tree;
- drag "name" element that belongs to USAddress and drop in on sequence node
within PurchaseOrderType;
- push Undo twice.

NPE with the following details is thrown:
java.lang.NullPointerException
	at
org.netbeans.modules.xml.xam.AbstractComponent.verifyWrite(AbstractComponent.java:179)
	at
org.netbeans.modules.xml.xam.AbstractComponent.removeChild(AbstractComponent.java:334)
	at org.netbeans.modules.xml.axi.AXIComponent.removeChild(AXIComponent.java:395)
	at org.netbeans.modules.xml.axi.AXIComponent.removeChild(AXIComponent.java:390)
	at org.netbeans.modules.xml.axi.AXIComponent.removeChild(AXIComponent.java:410)
	at
org.netbeans.modules.xml.axi.impl.AXIModelUpdater.removeChildren(AXIModelUpdater.java:192)
	at
org.netbeans.modules.xml.axi.impl.AXIModelUpdater.synchronize(AXIModelUpdater.java:159)
	at
org.netbeans.modules.xml.axi.impl.AXIModelUpdater.visitChildren(AXIModelUpdater.java:150)
	at
org.netbeans.modules.xml.axi.impl.AXIModelUpdater.visit(AXIModelUpdater.java:146)
	at org.netbeans.modules.xml.axi.Compositor.accept(Compositor.java:87)
	at
org.netbeans.modules.xml.axi.impl.AXIModelUpdater.visitChildren(AXIModelUpdater.java:153)
	at org.netbeans.modules.xml.axi.impl.AXIModelUpdater.visit(AXIModelUpdater.java:97)
	at org.netbeans.modules.xml.axi.impl.AXIModelUpdater.visit(AXIModelUpdater.java:81)
	at org.netbeans.modules.xml.axi.Element.accept(Element.java:58)
	at
org.netbeans.modules.xml.axi.impl.AXIModelUpdater.visitChildren(AXIModelUpdater.java:153)
	at
org.netbeans.modules.xml.axi.impl.AXIModelUpdater.visit(AXIModelUpdater.java:146)
	at org.netbeans.modules.xml.axi.Compositor.accept(Compositor.java:87)
	at
org.netbeans.modules.xml.axi.impl.AXIModelUpdater.visitChildren(AXIModelUpdater.java:153)
	at
org.netbeans.modules.xml.axi.visitor.DeepAXITreeVisitor.visit(DeepAXITreeVisitor.java:78)
	at org.netbeans.modules.xml.axi.ContentModel.accept(ContentModel.java:71)
	at
org.netbeans.modules.xml.axi.impl.AXIModelUpdater.visitChildren(AXIModelUpdater.java:153)
	at
org.netbeans.modules.xml.axi.visitor.DeepAXITreeVisitor.visit(DeepAXITreeVisitor.java:54)
	at org.netbeans.modules.xml.axi.AXIDocument.accept(AXIDocument.java:56)
	at
org.netbeans.modules.xml.axi.impl.AXIModelUpdater.doSync(AXIModelUpdater.java:73)
	at org.netbeans.modules.xml.axi.impl.AXIModelImpl.doSync(AXIModelImpl.java:131)
	at org.netbeans.modules.xml.axi.impl.ModelAccessImpl.sync(ModelAccessImpl.java:84)
	at org.netbeans.modules.xml.xam.AbstractModel.sync(AbstractModel.java:216)
[catch] at org.netbeans.modules.xml.xam.AbstractModel$1.run(AbstractModel.java:495)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:598)
	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 Ayub Khan 2006-07-18 05:13:14 UTC
Fix checked into release55 branch. Please verify using nightly build.
Comment 2 Ayub Khan 2006-07-18 07:58:02 UTC
Change list:
- xml/schema/api:
P api/test/unit/src/org/netbeans/modules/xml/schema/model/impl/xdm/SyncTest.java
U api/test/unit/src/org/netbeans/modules/xml/schema/model/resources/undoredotest.xsd
U
api/test/unit/src/org/netbeans/modules/xml/schema/model/resources/undoredotest1.xsd
U
api/test/unit/src/org/netbeans/modules/xml/schema/model/resources/undoredotest2.xsd

- xml/xdm:
U xdm/src/org/netbeans/modules/xml/xdm/diff/DefaultElementIdentity.java
P xdm/src/org/netbeans/modules/xml/xdm/diff/DiffFinder.java
P xdm/src/org/netbeans/modules/xml/xdm/diff/XDMTreeDiff.java
U xdm/src/org/netbeans/modules/xml/xdm/xam/XDMAccess.java
P xdm/test/unit/src/org/netbeans/modules/xml/xdm/diff/MergeDiffTest.java
Comment 3 Andrei Chistiakov 2006-07-18 11:56:20 UTC
Verified in build 060717.