Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 48252aaf8..e680ac795 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 0bf947aa9..5ee53bfa7 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 d441e3a0e..3f752861a 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