From e4890c2311a9860c7a4520111ca191af0f960e21 Mon Sep 17 00:00:00 2001 From: slaws Date: Tue, 6 Apr 2010 13:10:12 +0000 Subject: Check that there is actually something in the bundle list before trying to dereference it git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@931142 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sca-java-2.x/trunk/modules/node-launcher-equinox/src/main/java') diff --git a/sca-java-2.x/trunk/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java b/sca-java-2.x/trunk/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java index 2014e15939..90c89fda70 100644 --- a/sca-java-2.x/trunk/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java +++ b/sca-java-2.x/trunk/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java @@ -194,7 +194,7 @@ public class EquinoxHost { // Get bundle context from the running Eclipse instance bundleContext = injectedBundleContext; } - + // Determine the runtime classpath entries Set urls; urls = findBundleLocations(); @@ -203,6 +203,7 @@ public class EquinoxHost { // regular JARs for (URL url : urls) { File file = file(url); + Manifest manifest = getCustomizedMF(file.getName()); String bundleName = null; if (manifest == null) { @@ -550,14 +551,13 @@ public class EquinoxHost { } private Set findBundleLocations() throws FileNotFoundException, URISyntaxException, MalformedURLException { - if (bundleLocations == null) { + if (bundleLocations == null || + (bundleLocations != null && bundleLocations.size() == 0)) { if (injectedBundleContext != null) { - // Use classpath entries from a distribution if there is one and the modules // directories available in a dev environment for example bundleLocations = runtimeClasspathEntries(true, false, true); } else { - // Use classpath entries from a distribution if there is one and the classpath // entries on the current application's classloader // *** Changed by Mike Edwards, 9th April 2009 *** -- cgit v1.2.3