Index: catalog/manifest.mf
===================================================================
RCS file: /cvs/xml/catalog/manifest.mf,v
retrieving revision 1.4.2.10
diff -u -r1.4.2.10 manifest.mf
--- catalog/manifest.mf 29 Apr 2002 17:04:26 -0000 1.4.2.10
+++ catalog/manifest.mf 18 Jun 2002 14:56:24 -0000
@@ -3,9 +3,9 @@
OpenIDE-Module-Install: org/netbeans/modules/xml/catalog/CatalogModuleInstall.class
OpenIDE-Module-Layer: org/netbeans/modules/xml/catalog/resources/mf-layer.xml
OpenIDE-Module-IDE-Dependencies: IDE/1 > 1.24
-OpenIDE-Module-Specification-Version: 0.2.8
+OpenIDE-Module-Specification-Version: 0.2.9
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
-OpenIDE-Module-Module-Dependencies: org.netbeans.modules.xml.core/1 > 0.2.7
+OpenIDE-Module-Module-Dependencies: org.netbeans.modules.xml.core/1 > 0.2.9
Class-Path: docs/xml-catalog.jar ext/resolver-1_1_nb.jar
Name: org/netbeans/modules/xml/catalog/CatalogRootNode.class
Index: compat/manifest.mf
===================================================================
RCS file: /cvs/xml/compat/manifest.mf,v
retrieving revision 1.3.2.9
diff -u -r1.3.2.9 manifest.mf
--- compat/manifest.mf 29 Apr 2002 17:04:38 -0000 1.3.2.9
+++ compat/manifest.mf 18 Jun 2002 14:56:24 -0000
@@ -1,6 +1,6 @@
OpenIDE-Module: org.netbeans.modules.xml/2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/xml/resources/Bundle.properties
OpenIDE-Module-IDE-Dependencies: IDE/1 > 1.42
-OpenIDE-Module-Specification-Version: 0.2.8
+OpenIDE-Module-Specification-Version: 0.2.9
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
-OpenIDE-Module-Module-Dependencies: org.netbeans.modules.xml.catalog/1 > 0.2.7, org.netbeans.modules.xml.core/1 > 0.2.7, org.netbeans.modules.css/1 > 0.2.7, org.netbeans.modules.xml.tax/1 > 0.5.7, org.netbeans.modules.xml.text/1 > 0.2.7, org.netbeans.modules.xml.tools/1 > 0.2.7, org.netbeans.modules.xml.tree/1 > 0.2.7
+OpenIDE-Module-Module-Dependencies: org.netbeans.modules.xml.catalog/1 > 0.2.9, org.netbeans.modules.xml.core/1 > 0.2.9, org.netbeans.modules.css/1 > 0.2.9, org.netbeans.modules.xml.tax/1 > 0.5.9, org.netbeans.modules.xml.text/1 > 0.2.9, org.netbeans.modules.xml.tools/1 > 0.2.9, org.netbeans.modules.xml.tree/1 > 0.2.9
Index: core/manifest.mf
===================================================================
RCS file: /cvs/xml/core/manifest.mf,v
retrieving revision 1.9.2.9
diff -u -r1.9.2.9 manifest.mf
--- core/manifest.mf 29 Apr 2002 17:04:42 -0000 1.9.2.9
+++ core/manifest.mf 18 Jun 2002 14:56:24 -0000
@@ -3,9 +3,9 @@
OpenIDE-Module-Install: org/netbeans/modules/xml/core/CoreModuleInstall.class
OpenIDE-Module-Layer: org/netbeans/modules/xml/core/resources/mf-layer.xml
OpenIDE-Module-IDE-Dependencies: IDE/1 > 1.43
-OpenIDE-Module-Specification-Version: 0.2.8
+OpenIDE-Module-Specification-Version: 0.2.9
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
-OpenIDE-Module-Module-Dependencies: org.netbeans.modules.xml.tax/1 > 0.5.7, org.openidex.util/2 > 2.1.1
+OpenIDE-Module-Module-Dependencies: org.netbeans.modules.xml.tax/1 > 0.5.9, org.openidex.util/2 > 2.1.1
Class-Path: docs/xml-core.jar
Name: org/netbeans/modules/xml/core/XMLDataLoader.class
Index: css/manifest.mf
===================================================================
RCS file: /cvs/xml/css/manifest.mf,v
retrieving revision 1.4.2.8
diff -u -r1.4.2.8 manifest.mf
--- css/manifest.mf 29 Apr 2002 17:05:20 -0000 1.4.2.8
+++ css/manifest.mf 18 Jun 2002 14:56:24 -0000
@@ -3,7 +3,7 @@
OpenIDE-Module-Install: org/netbeans/modules/css/CSSModuleInstall.class
OpenIDE-Module-Layer: org/netbeans/modules/css/resources/mf-layer.xml
OpenIDE-Module-IDE-Dependencies: IDE/1 > 1.24
-OpenIDE-Module-Specification-Version: 0.2.8
+OpenIDE-Module-Specification-Version: 0.2.9
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.editor/1 > 1.7
Class-Path: docs/css.jar ext/flute.jar ext/sac.jar
Index: tax/manifest.mf
===================================================================
RCS file: /cvs/xml/tax/manifest.mf,v
retrieving revision 1.2.2.9
diff -u -r1.2.2.9 manifest.mf
--- tax/manifest.mf 29 Apr 2002 17:05:32 -0000 1.2.2.9
+++ tax/manifest.mf 18 Jun 2002 14:56:24 -0000
@@ -2,6 +2,6 @@
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/xml/tax/resources/Bundle.properties
OpenIDE-Module-Install: org/netbeans/modules/xml/tax/TAXModuleInstall.class
OpenIDE-Module-IDE-Dependencies: IDE/1 > 1.24
-OpenIDE-Module-Specification-Version: 0.5.8
+OpenIDE-Module-Specification-Version: 0.5.9
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
Class-Path: ../ext/tax.jar ../docs/xml-tax.jar ../ext/xerces2.jar
Index: text-edit/manifest.mf
===================================================================
RCS file: /cvs/xml/text-edit/manifest.mf,v
retrieving revision 1.5.2.9
diff -u -r1.5.2.9 manifest.mf
--- text-edit/manifest.mf 29 Apr 2002 17:05:51 -0000 1.5.2.9
+++ text-edit/manifest.mf 18 Jun 2002 14:56:25 -0000
@@ -3,7 +3,7 @@
OpenIDE-Module-Install: org/netbeans/modules/xml/text/TextEditModuleInstall.class
OpenIDE-Module-Layer: org/netbeans/modules/xml/text/resources/mf-layer.xml
OpenIDE-Module-IDE-Dependencies: IDE/1 > 1.24
-OpenIDE-Module-Specification-Version: 0.2.8
+OpenIDE-Module-Specification-Version: 0.2.9
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
-OpenIDE-Module-Module-Dependencies: org.netbeans.modules.xml.core/1 > 0.2.7, org.netbeans.modules.editor/1 > 1.7
+OpenIDE-Module-Module-Dependencies: org.netbeans.modules.xml.core/1 > 0.2.9, org.netbeans.modules.editor/1 > 1.7
Class-Path: docs/xml-text-edit.jar
Index: tools/manifest.mf
===================================================================
RCS file: /cvs/xml/tools/manifest.mf,v
retrieving revision 1.4.2.9
diff -u -r1.4.2.9 manifest.mf
--- tools/manifest.mf 29 Apr 2002 17:05:56 -0000 1.4.2.9
+++ tools/manifest.mf 18 Jun 2002 14:56:25 -0000
@@ -3,7 +3,7 @@
OpenIDE-Module-Install: org/netbeans/modules/xml/tools/ToolsModuleInstall.class
OpenIDE-Module-Layer: org/netbeans/modules/xml/tools/resources/mf-layer.xml
OpenIDE-Module-IDE-Dependencies: IDE/1 > 1.24
-OpenIDE-Module-Specification-Version: 0.2.8
+OpenIDE-Module-Specification-Version: 0.2.9
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
-OpenIDE-Module-Module-Dependencies: org.netbeans.modules.xml.core/1 > 0.2.7
+OpenIDE-Module-Module-Dependencies: org.netbeans.modules.xml.core/1 > 0.2.9
Class-Path: docs/xml-tools.jar
Index: tree-edit/manifest.mf
===================================================================
RCS file: /cvs/xml/tree-edit/manifest.mf,v
retrieving revision 1.7.2.9
diff -u -r1.7.2.9 manifest.mf
--- tree-edit/manifest.mf 29 Apr 2002 17:06:02 -0000 1.7.2.9
+++ tree-edit/manifest.mf 18 Jun 2002 14:56:25 -0000
@@ -3,7 +3,7 @@
OpenIDE-Module-Install: org/netbeans/modules/xml/tree/TreeEditModuleInstall.class
OpenIDE-Module-Layer: org/netbeans/modules/xml/tree/resources/mf-layer.xml
OpenIDE-Module-IDE-Dependencies: IDE/1 > 1.24
-OpenIDE-Module-Specification-Version: 0.2.8
+OpenIDE-Module-Specification-Version: 0.2.9
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
-OpenIDE-Module-Module-Dependencies: org.netbeans.modules.xml.core/1 > 0.2.7, org.netbeans.modules.xml.tax/1 > 0.5.7, org.openidex.util/2 > 2.1.1
+OpenIDE-Module-Module-Dependencies: org.netbeans.modules.xml.core/1 > 0.2.9, org.netbeans.modules.xml.tax/1 > 0.5.9, org.openidex.util/2 > 2.1.1
Class-Path: docs/xml-tree-edit.jar
Index: tree-edit/src/org/netbeans/modules/xml/tree/editor/TreeEditorComponent.java
===================================================================
RCS file: /cvs/xml/tree-edit/src/org/netbeans/modules/xml/tree/editor/TreeEditorComponent.java,v
retrieving revision 1.2.4.4
diff -u -r1.2.4.4 TreeEditorComponent.java
--- tree-edit/src/org/netbeans/modules/xml/tree/editor/TreeEditorComponent.java 30 Jan 2002 15:45:11 -0000 1.2.4.4
+++ tree-edit/src/org/netbeans/modules/xml/tree/editor/TreeEditorComponent.java 18 Jun 2002 14:56:25 -0000
@@ -197,6 +197,11 @@
* @return true
if close succeeded
*/
protected boolean closeLast () {
+ //#19687 it should be invariant!
+ if ( support == null ) {
+ return true;
+ }
+
if (!!! support.canClose()) {
// if we cannot close the last window
return false;
@@ -240,6 +245,11 @@
protected void componentActivated () {
super.componentActivated();
+ //#19687 it should be invariant!
+ if ( explorerPanel == null ) {
+ return;
+ }
+
try {
Method explorerPanelComponentActivatedMethod = ExplorerPanel.class.getDeclaredMethod ("componentActivated", null); // NOI18N
explorerPanelComponentActivatedMethod.setAccessible (true);
@@ -258,6 +268,11 @@
protected void componentDeactivated () {
super.componentDeactivated();
+ //#19687 it should be invariant!
+ if ( explorerPanel == null ) {
+ return;
+ }
+
try {
Method explorerPanelComponentDeactivatedMethod = ExplorerPanel.class.getDeclaredMethod ("componentDeactivated", null); // NOI18N
explorerPanelComponentDeactivatedMethod.setAccessible (true);
@@ -272,6 +287,25 @@
}
+ /**
+ * Test top component validity. For invalid ones return null
.
+ */
+ protected Object writeReplace() throws ObjectStreamException {
+
+ //#19687 it should be invariant!
+ if (support == null) {
+ return null;
+ }
+
+ // #24350 do not write down data for invalid data objects
+ DataObject dataObject = support.getDataObject();
+ if (dataObject.isValid() == false) {
+ return null;
+ }
+
+ return super.writeReplace();
+ }
+
/** Serialize this top component.
* Subclasses wishing to store state must call the super method, then write to the stream.
* @param out the stream to serialize to
@@ -280,11 +314,6 @@
if ( DEBUG ) Util.debug("TreeEditorComponent.writeExternal()"); // NOI18N
super.writeExternal (out);
-
- if (support == null) { //!!! it should be invariant!
- return; //#19687
- }
-
out.writeObject (support.getEnv());
if ( DEBUG ) Util.debug("\tdone."); // NOI18N
@@ -299,8 +328,18 @@
super.readExternal (in);
- TreeEditorSupport.Env env = (TreeEditorSupport.Env) in.readObject();
- support = (TreeEditorSupport) env.findTreeEditorSupport();
+ try {
+ TreeEditorSupport.Env env = (TreeEditorSupport.Env) in.readObject();
+ support = (TreeEditorSupport) env.findTreeEditorSupport();
+ } catch (OptionalDataException exc) { //!!! is should be invariant (see writeExternal)
+ if ( exc.eof == true ) { // caused because 'out.writeObject (support.getEnv());' was not called
+ return; // #20487
+ } else {
+ throw exc;
+ }
+ } catch (ClassCastException exc) { // env.findTreeEditorSupport(); // #20145
+ return;
+ }
if (!!! ((DataObject)getXMLDataObjectLook()).isValid() ) {
return;