235445 [hotbug] CatalogWriter.write() does not closing the outputstream -> leaves files locked
diff --git a/bundles/org.eclipse.wst.xml.core/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.xml.core/META-INF/MANIFEST.MF
index 2bf4fa3..1909830 100644
--- a/bundles/org.eclipse.wst.xml.core/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.xml.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.wst.xml.core; singleton:=true
-Bundle-Version: 1.1.101.qualifier
+Bundle-Version: 1.1.102.qualifier
Bundle-Activator: org.eclipse.wst.xml.core.internal.XMLCorePlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/CatalogWriter.java b/bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/CatalogWriter.java
index cb4150a..aec5c5b 100644
--- a/bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/CatalogWriter.java
+++ b/bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/CatalogWriter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
+ * Copyright (c) 2002, 2008 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -44,9 +44,17 @@
public void write(ICatalog xmlCatalog, String uri) throws FileNotFoundException, IOException
{
- visitCatalog(xmlCatalog);
- OutputStream outputStream = getOutputStream(uri);
- serialize(outputStream);
+ OutputStream outputStream = null;
+ try {
+ visitCatalog(xmlCatalog);
+ outputStream = getOutputStream(uri);
+ serialize(outputStream);
+ }
+ finally {
+ if(outputStream != null) {
+ outputStream.close();
+ }
+ }
}
public void write(ICatalog catalog, OutputStream os) throws FileNotFoundException, IOException
diff --git a/features/org.eclipse.wst.xml_core.feature.patch/feature.xml b/features/org.eclipse.wst.xml_core.feature.patch/feature.xml
index d2598d8..6de62d2 100644
--- a/features/org.eclipse.wst.xml_core.feature.patch/feature.xml
+++ b/features/org.eclipse.wst.xml_core.feature.patch/feature.xml
@@ -31,5 +31,11 @@
install-size="0"
version="0.0.0"
unpack="false"/>
+ <plugin
+ id="org.eclipse.wst.xml.core"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
</feature>