Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2019-07-10 12:34:41 -0400
committerThomas Watson2019-07-10 14:31:06 -0400
commit8ad24e0348defd620d1e5f1b0ebbe4ec3beb2f45 (patch)
tree06cbee63805672cd0a8f02efa06213a06860ebbd
parent1113eea1d94d806acc988ea5109f2684b96b2a31 (diff)
downloadrt.equinox.bundles-8ad24e0348defd620d1e5f1b0ebbe4ec3beb2f45.tar.gz
rt.equinox.bundles-8ad24e0348defd620d1e5f1b0ebbe4ec3beb2f45.tar.xz
rt.equinox.bundles-8ad24e0348defd620d1e5f1b0ebbe4ec3beb2f45.zip
Change-Id: Icb70c9c027a20879dc8b7622dc11c383f2df403e Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
-rw-r--r--bundles/org.eclipse.equinox.region/META-INF/MANIFEST.MF2
-rw-r--r--bundles/org.eclipse.equinox.region/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.region/src/org/eclipse/equinox/internal/region/RegionManager.java21
3 files changed, 5 insertions, 20 deletions
diff --git a/bundles/org.eclipse.equinox.region/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.region/META-INF/MANIFEST.MF
index 48252aaf..e680ac79 100644
--- a/bundles/org.eclipse.equinox.region/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.region/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.eclipse.equinox.region
-Bundle-Version: 1.4.400.qualifier
+Bundle-Version: 1.4.500.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Fragment-Host: system.bundle
ExtensionBundle-Activator: org.eclipse.equinox.internal.region.RegionManager
diff --git a/bundles/org.eclipse.equinox.region/pom.xml b/bundles/org.eclipse.equinox.region/pom.xml
index 0bf947aa..5ee53bfa 100644
--- a/bundles/org.eclipse.equinox.region/pom.xml
+++ b/bundles/org.eclipse.equinox.region/pom.xml
@@ -19,6 +19,6 @@
</parent>
<groupId>org.eclipse.equinox</groupId>
<artifactId>org.eclipse.equinox.region</artifactId>
- <version>1.4.400-SNAPSHOT</version>
+ <version>1.4.500-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/bundles/org.eclipse.equinox.region/src/org/eclipse/equinox/internal/region/RegionManager.java b/bundles/org.eclipse.equinox.region/src/org/eclipse/equinox/internal/region/RegionManager.java
index d441e3a0..3f752861 100644
--- a/bundles/org.eclipse.equinox.region/src/org/eclipse/equinox/internal/region/RegionManager.java
+++ b/bundles/org.eclipse.equinox.region/src/org/eclipse/equinox/internal/region/RegionManager.java
@@ -101,16 +101,9 @@ public final class RegionManager implements BundleActivator {
// no persistent digraph available, create a new one
return createRegionDigraph();
}
- FileInputStream in = new FileInputStream(digraphFile);
- try {
+ try (InputStream in = new BufferedInputStream(new FileInputStream(digraphFile))) {
// TODO need to validate bundle IDs to make sure they are consistent with current bundles
return StandardRegionDigraphPersistence.readRegionDigraph(new DataInputStream(in), this.bundleContext, this.threadLocal);
- } finally {
- try {
- in.close();
- } catch (IOException e) {
- // We tried our best to clean up
- }
}
}
@@ -124,17 +117,9 @@ public final class RegionManager implements BundleActivator {
}
private void saveDigraph() throws IOException {
- FileOutputStream digraphFile = new FileOutputStream(bundleContext.getDataFile(DIGRAPH_FILE));
- try {
- digraph.getRegionDigraphPersistence().save(digraph, digraphFile);
- } finally {
- try {
- digraphFile.close();
- } catch (IOException e) {
- // ignore;
- }
+ try (OutputStream out = new BufferedOutputStream(new FileOutputStream(bundleContext.getDataFile(DIGRAPH_FILE)))) {
+ digraph.getRegionDigraphPersistence().save(digraph, out);
}
-
}
private StandardManageableRegionDigraph registerDigraphMbean(RegionDigraph regionDigraph) {

Back to the top