Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2013-08-22 15:36:31 +0000
committerThomas Watson2013-08-22 15:37:12 +0000
commit20467188f57babb69ead18b70cfd91f3e8dd3505 (patch)
treeb08728c4e8f3ecc3d6269a9bc09e7ca7b410c17a /bundles
parent75cec4b5e122ccde88ae37d4ab8c5eda851d58c5 (diff)
downloadrt.equinox.framework-20467188f57babb69ead18b70cfd91f3e8dd3505.tar.gz
rt.equinox.framework-20467188f57babb69ead18b70cfd91f3e8dd3505.tar.xz
rt.equinox.framework-20467188f57babb69ead18b70cfd91f3e8dd3505.zip
Check to make sure there is a valid bundle file at install time
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java2
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/ZipBundleFile.java6
2 files changed, 5 insertions, 3 deletions
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java
index cd584e853..8a5e5abfd 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java
@@ -452,6 +452,8 @@ public class Storage {
File contentFile = getContentFile(staged, isReference, lockedID, generation.getGenerationId());
generation.setContent(contentFile, isReference);
+ // Check that we can open the bundle file
+ generation.getBundleFile().open();
setStorageHooks(generation);
ModuleRevisionBuilder builder = getBuilder(generation);
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/ZipBundleFile.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/ZipBundleFile.java
index 8582e037c..d8f796a48 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/ZipBundleFile.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/ZipBundleFile.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation and others.
+ * Copyright (c) 2005, 2013 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
@@ -337,8 +337,8 @@ public class ZipBundleFile extends BundleFile {
}
}
- public void open() {
- //do nothing
+ public void open() throws IOException {
+ getZipFile();
}
synchronized void incrementReference() {

Back to the top