You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by sl...@apache.org on 2010/04/06 15:10:12 UTC

svn commit: r931142 - /tuscany/sca-java-2.x/trunk/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java

Author: slaws
Date: Tue Apr  6 13:10:12 2010
New Revision: 931142

URL: http://svn.apache.org/viewvc?rev=931142&view=rev
Log:
Check that there is actually something in the bundle list before trying to dereference it

Modified:
    tuscany/sca-java-2.x/trunk/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java

Modified: tuscany/sca-java-2.x/trunk/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java?rev=931142&r1=931141&r2=931142&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java Tue Apr  6 13:10:12 2010
@@ -194,7 +194,7 @@ public class EquinoxHost {
                 // Get bundle context from the running Eclipse instance
                 bundleContext = injectedBundleContext;
             }
-
+            
             // Determine the runtime classpath entries
             Set<URL> 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<URL> 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 ***