sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pa...@apache.org
Subject [sling-org-apache-sling-feature-launcher] branch master updated: Don't refresh for fragment attach.
Date Tue, 08 May 2018 14:05:05 GMT
This is an automated email from the ASF dual-hosted git repository.

pauls pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-feature-launcher.git


The following commit(s) were added to refs/heads/master by this push:
     new 4648f5d  Don't refresh for fragment attach.
4648f5d is described below

commit 4648f5d5787d1f92fe2850b99b37f790a9b87019
Author: Karl Pauls <karlpauls@gmail.com>
AuthorDate: Tue May 8 16:04:52 2018 +0200

    Don't refresh for fragment attach.
---
 .../launcher/impl/launchers/AbstractRunner.java     | 21 ++++-----------------
 1 file changed, 4 insertions(+), 17 deletions(-)

diff --git a/src/main/java/org/apache/sling/feature/launcher/impl/launchers/AbstractRunner.java
b/src/main/java/org/apache/sling/feature/launcher/impl/launchers/AbstractRunner.java
index 0be1804..4a3976b 100644
--- a/src/main/java/org/apache/sling/feature/launcher/impl/launchers/AbstractRunner.java
+++ b/src/main/java/org/apache/sling/feature/launcher/impl/launchers/AbstractRunner.java
@@ -24,7 +24,6 @@ import org.osgi.framework.Constants;
 import org.osgi.framework.ServiceReference;
 import org.osgi.framework.launch.Framework;
 import org.osgi.framework.startlevel.BundleStartLevel;
-import org.osgi.framework.wiring.FrameworkWiring;
 import org.osgi.util.tracker.ServiceTracker;
 import org.osgi.util.tracker.ServiceTrackerCustomizer;
 
@@ -191,25 +190,13 @@ public class AbstractRunner {
                 // use reference protocol. This avoids copying the binary to the cache directory
                 // of the framework
                 final Bundle bundle = bc.installBundle("reference:" + file.toURI().toURL(),
null);
-                if ( startLevel > 0 ) {
-                    bundle.adapt(BundleStartLevel.class).setStartLevel(startLevel);
-                }
 
                 // fragment?
-                if ( !isSystemBundleFragment(bundle) ) {
-                    final String fragmentHostHeader = getFragmentHostHeader(bundle);
-                    if (fragmentHostHeader != null) {
-                        for (final Bundle b : bc.getBundles()) {
-                            if (fragmentHostHeader.equals(b.getSymbolicName())) {
-                                final FrameworkWiring fw = framework.adapt(FrameworkWiring.class);
-                                fw.refreshBundles(Collections.singleton(b));
-                                break;
-                            }
-                        }
-
-                    } else {
-                        bundle.start();
+                if ( !isSystemBundleFragment(bundle) && getFragmentHostHeader(bundle)
== null ) {
+                    if ( startLevel > 0 ) {
+                        bundle.adapt(BundleStartLevel.class).setStartLevel(startLevel);
                     }
+                    bundle.start();
                 }
             }
         }

-- 
To stop receiving notification emails like this one, please contact
pauls@apache.org.

Mime
View raw message