Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.osgi/container/src/org')
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/ModuleClassLoader.java5
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/BundleInfo.java5
2 files changed, 9 insertions, 1 deletions
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/ModuleClassLoader.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/ModuleClassLoader.java
index 7593c3006..199599389 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/ModuleClassLoader.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/ModuleClassLoader.java
@@ -11,6 +11,7 @@
package org.eclipse.osgi.internal.loader;
+import java.io.File;
import java.io.IOException;
import java.lang.reflect.Method;
import java.net.MalformedURLException;
@@ -357,7 +358,9 @@ public abstract class ModuleClassLoader extends ClassLoader implements BundleRef
if (signers.length > 0)
certs = signers[0].getCertificateChain();
}
- return new GenerationProtectionDomain(new CodeSource(bundlefile.getBaseFile().toURL(), certs), permissions, getGeneration());
+ File file = bundlefile.getBaseFile();
+ // Bug 477787: file will be null when the osgi.framework configuration property contains an invalid value.
+ return new GenerationProtectionDomain(file == null ? null : new CodeSource(file.toURL(), certs), permissions, getGeneration());
//return new ProtectionDomain(new CodeSource(bundlefile.getBaseFile().toURL(), certs), permissions);
} catch (MalformedURLException e) {
// Failed to create our own domain; just return the baseDomain
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/BundleInfo.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/BundleInfo.java
index e04e6d29f..4ab00f0aa 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/BundleInfo.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/BundleInfo.java
@@ -192,6 +192,11 @@ public final class BundleInfo {
}
private void setLastModified(File content) {
+ if (content == null) {
+ // Bug 477787: content will be null when the osgi.framework configuration property contains an invalid value.
+ lastModified = 0;
+ return;
+ }
if (isDirectory)
content = new File(content, "META-INF/MANIFEST.MF"); //$NON-NLS-1$
lastModified = Storage.secureAction.lastModified(content);

Back to the top