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.
Reproduced in build 060827 (JDK 1.6 beta 2). To reproduce the bug: - open a single file OTA schema; - apply Russian Doll design pattern to it; - close the schema/discard changes; - immediately after closing reopen the schema. java.lang.NullPointerException at org.netbeans.modules.xml.xdm.diff.MergeDiff.merge(MergeDiff.java:71) at org.netbeans.modules.xml.xdm.diff.XDMTreeDiff.mergeDiff(XDMTreeDiff.java:69) at org.netbeans.modules.xml.xdm.XDMModel.finishSync(XDMModel.java:185) at org.netbeans.modules.xml.xdm.XDMModel.sync(XDMModel.java:127) at org.netbeans.modules.xml.xdm.xam.XDMAccess.sync(XDMAccess.java:121) ...
*** Issue 83599 has been marked as a duplicate of this issue. ***
*** Issue 83579 has been marked as a duplicate of this issue. ***
*** Issue 83570 has been marked as a duplicate of this issue. ***
Nam, please take a look at this issue.
The issue is in the order of applying diffs and the fact that we do position changes by delete and add a clone complicate the updating of the changed nodes for next diff application. Fix by changing the applying order and implement reorder mutation: /cvs/xml/xdm/src/org/netbeans/modules/xml/xdm/diff/MergeDiff.java,v <-- MergeDiff.java new revision: 1.2.2.12; previous revision: 1.2.2.11 /cvs/xml/xdm/src/org/netbeans/modules/xml/xdm/diff/DiffFinder.java,v <-- DiffFinder.java new revision: 1.2.2.16; previous revision: 1.2.2.15 /cvs/xml/xdm/src/org/netbeans/modules/xml/xdm/diff/Attic/Change.java,v <-- Change.java new revision: 1.1.2.7; previous revision: 1.1.2.6 /cvs/xml/xdm/src/org/netbeans/modules/xml/xdm/diff/Attic/Difference.java,v <-- Difference.java new revision: 1.1.2.6; previous revision: 1.1.2.5 /cvs/xml/xdm/src/org/netbeans/modules/xml/xdm/diff/Attic/Add.java,v <-- Add.java new revision: 1.1.2.7; previous revision: 1.1.2.6 /cvs/xml/xdm/src/org/netbeans/modules/xml/xdm/diff/Attic/NodeInfo.java,v <-- NodeInfo.java new revision: 1.1.2.7; previous revision: 1.1.2.6 /cvs/xml/xdm/src/org/netbeans/modules/xml/xdm/diff/Attic/Delete.java,v <-- Delete.java new revision: 1.1.2.7; previous revision: 1.1.2.6 /cvs/xml/xdm/src/org/netbeans/modules/xml/xdm/nodes/NodeImpl.java,v <-- NodeImpl.java new revision: 1.2.2.17; previous revision: 1.2.2.16 /cvs/xml/xdm/src/org/netbeans/modules/xml/xdm/nodes/Element.java,v <-- Element.java new revision: 1.2.2.11; previous revision: 1.2.2.10 /cvs/xml/xdm/src/org/netbeans/modules/xml/xdm/XDMModel.java,v <-- XDMModel.java
Verified in build 060831_2.