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.
Summary: | REGRESSION: Schema is treated as not well-formed after Apply Design Pattern->Close/Discard changes->reopen | ||
---|---|---|---|
Product: | xml | Reporter: | Andrei Chistiakov <ca-nb> |
Component: | Schema Tools | Assignee: | Nam Nguyen <nnguyen> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | CC: | htt, ivansidorkin, kozlov |
Priority: | P2 | ||
Version: | 5.x | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
fix
an improved fix |
Description
Andrei Chistiakov
2006-10-11 15:02:45 UTC
After discard changes, the schema model's state becomes NOT_WELL_FORMED. I'm not sure why. Need to investigate further. On discard changes I get the following exception: java.lang.AssertionError at org.netbeans.modules.xml.xdm.diff.MergeDiff.processAddOrReorder(Merge Diff.java:208) at org.netbeans.modules.xml.xdm.diff.MergeDiff.applyChildrenDiffs(MergeD iff.java:131) at org.netbeans.modules.xml.xdm.diff.MergeDiff.merge(MergeDiff.java:85) at org.netbeans.modules.xml.xdm.diff.XDMTreeDiff.mergeDiff(XDMTreeDiff.j ava:65) at org.netbeans.modules.xml.xdm.XDMModel.finishSync(XDMModel.java:204) at org.netbeans.modules.xml.xdm.XDMModel.sync(XDMModel.java:146) at org.netbeans.modules.xml.xdm.xam.XDMAccess.sync(XDMAccess.java:121) at org.netbeans.modules.xml.xam.AbstractModel.sync(AbstractModel.java:23 0) at org.netbeans.modules.xml.axi.impl.AXIModelImpl.sync(AXIModelImpl.java :163) at org.netbeans.modules.xml.xam.AbstractModel$1.run(AbstractModel.java:5 36) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:461) [catch] at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh read.java:242) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre ad.java:163) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149) at java.awt.EventDispatchThread.run(EventDispatchThread.java:110) assigning to nam The xdm assert error is a separated issue 87153. We fix this current issue by rework the fix for issue 86942 so that schema model is not sync on discard. On the other hand, since the assertion error is replaced by an IllegalArgumentException which is handled by auto-sync or UI, we just need to detect if schema model is not well-formed state, then we force reload the document which would trigger reset of the schema root and also refresh the axi model. Fixed is checked in relesae55_dev, and diffs is attached. Created attachment 35203 [details]
fix
Note that the verification of this issue needs to be done with assertion turned OFF as followed. Edit NB55/etc/netbeans.conf so that the property netbeans_default_options will have value include '-J-da' instead of '-J-ea'. This is the configuration of production build that we will ship. The diffs look good. Created attachment 35241 [details]
an improved fix
Fix committed to release55. Verified in build 061016_1. |