diff options
author | Thomas Watson | 2017-04-14 13:08:15 +0000 |
---|---|---|
committer | Thomas Watson | 2017-04-14 13:08:15 +0000 |
commit | 14ba56a46e938546a7e1f2c3b90c399b7b2fd667 (patch) | |
tree | da961f4315d419cc30d27c9b5773138ed6f1e20b | |
parent | d47b31f29c20c64c0730bd84d191f6b424df81e4 (diff) | |
download | rt.equinox.framework-14ba56a46e938546a7e1f2c3b90c399b7b2fd667.tar.gz rt.equinox.framework-14ba56a46e938546a7e1f2c3b90c399b7b2fd667.tar.xz rt.equinox.framework-14ba56a46e938546a7e1f2c3b90c399b7b2fd667.zip |
Bug 515286 - Init of FrameworkExtensionInstaller fails with JDK9
Change-Id: Id0544936abf98b465ea8cd8bf1558d7c19d6e379
Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
-rw-r--r-- | bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/FrameworkExtensionInstaller.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/FrameworkExtensionInstaller.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/FrameworkExtensionInstaller.java index 794fa5c62..b3f084593 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/FrameworkExtensionInstaller.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/FrameworkExtensionInstaller.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2013, 2016 IBM Corporation and others. + * Copyright (c) 2013, 2017 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 @@ -93,9 +93,14 @@ public class FrameworkExtensionInstaller { } void addExtensionContent0(Collection<ModuleRevision> revisions, Module systemModule) throws BundleException { + if (revisions.isEmpty()) { + // NOTE: revisions could be empty when initializing the framework with no + // framework extensions + return; + } if (CL == null || ADD_FWK_URL_METHOD == null) { // use the first revision as the blame - ModuleRevision revision = revisions.isEmpty() ? null : revisions.iterator().next(); + ModuleRevision revision = revisions.iterator().next(); throw new BundleException("Cannot support framework extension bundles without a public addURL(URL) method on the framework class loader: " + revision.getBundle()); //$NON-NLS-1$ } |