Remove initial reference for bootclasspath bundles
authorMathieu Baudier <mbaudier@argeo.org>
Mon, 27 Jul 2009 07:30:43 +0000 (07:30 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Mon, 27 Jul 2009 07:30:43 +0000 (07:30 +0000)
git-svn-id: https://svn.argeo.org/slc/trunk@2774 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

runtime/org.argeo.slc.lib.detached/src/main/java/org/argeo/slc/lib/detached/DetachedLauncher.java

index 6f06d24d2c48781c7e37e6ee846f146593a29d3a..12085491495b3797056e6f2852c916895c4509d1 100644 (file)
@@ -57,18 +57,18 @@ public class DetachedLauncher extends JvmProcess implements BundleContextAware,
                bundles: for (Bundle bundle : bundleContext.getBundles()) {
                        String name = bundle.getSymbolicName();
                        String location = bundle.getLocation();
+                       location = removeInitialReference(location);
 
                        // Special bundles
                        if (osgibootBundleName.equals(name))
-                               getClasspath().add(findOsgiboot(bundle));
+                               getClasspath().add(asResource(location));
                        else if (equinoxBundleName.equals(name))
                                continue bundles;// skip framework
                        else if (xmlapisBundleName.equals(name) && prependXmlJars)
-                               getPBootClasspath().add(asResource(bundle.getLocation()));
+                               getPBootClasspath().add(asResource(location));
                        else if (xercesBundleName.equals(name) && prependXmlJars)
-                               getPBootClasspath().add(asResource(bundle.getLocation()));
+                               getPBootClasspath().add(asResource(location));
 
-                       location = removeInitialReference(location);
                        if (location.startsWith("file:")) {
                                File file = new File(location.substring("file:".length()));
                                if (osgiLocations.length() != 0)
@@ -88,12 +88,6 @@ public class DetachedLauncher extends JvmProcess implements BundleContextAware,
                                osgiLocations.toString());
        }
 
-       protected Resource findOsgiboot(Bundle bundle) {
-               String location = bundle.getLocation();
-               location = removeInitialReference(location);
-               return asResource(location);
-       }
-       
        protected String removeInitialReference(String location){
                if (location.startsWith("initial@reference:file:"))
                        location = System.getProperty("osgi.install.area")