This is an automated email from the ASF dual-hosted git repository.
pauls pushed a commit to branch startupmanager
in repository https://gitbox.apache.org/repos/asf/sling-whiteboard.git
The following commit(s) were added to refs/heads/startupmanager by this push:
new e25948a Startupmanager can not delegate to the StartupHandler anymore
because it is now providing that one itself.
e25948a is described below
commit e25948ab22a0d7a412c1fe1e670259f8ab1716c5
Author: Karl Pauls <[email protected]>
AuthorDate: Tue Nov 27 15:54:39 2018 +0100
Startupmanager can not delegate to the StartupHandler anymore because it is
now providing that one itself.
---
.../sling/launchpad/startupmanager/StartupListenerTracker.java | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git
a/startupmanager/src/main/java/org/apache/sling/launchpad/startupmanager/StartupListenerTracker.java
b/startupmanager/src/main/java/org/apache/sling/launchpad/startupmanager/StartupListenerTracker.java
index 532acf6..14f083b 100644
---
a/startupmanager/src/main/java/org/apache/sling/launchpad/startupmanager/StartupListenerTracker.java
+++
b/startupmanager/src/main/java/org/apache/sling/launchpad/startupmanager/StartupListenerTracker.java
@@ -46,10 +46,7 @@ public class StartupListenerTracker implements
FrameworkListener, BundleListener
StartupListenerTracker(final BundleContext bundleContext) {
this.bundleContext = bundleContext;
- final ServiceReference<StartupHandler> startupHandlerServiceReference
= bundleContext.getServiceReference(StartupHandler.class);
- final StartupHandler startupHandler =
bundleContext.getService(startupHandlerServiceReference);
- startupMode = startupHandler.getMode();
- bundleContext.ungetService(startupHandlerServiceReference);
+ startupMode = StartupMode.INSTALL;
tracker = new ServiceTracker<>(bundleContext, StartupListener.class,
new ServiceTrackerCustomizer<StartupListener,
StartupListener>() {
@@ -68,7 +65,7 @@ public class StartupListenerTracker implements
FrameworkListener, BundleListener
final StartupListener listener =
bundleContext.getService(reference);
if (listener != null) {
try {
- listener.inform(startupHandler.getMode(),
frameworkStarted);
+ listener.inform(startupMode, frameworkStarted);
} catch (final Throwable t) {
log.error("Error calling StartupListener {}",
listener, t);
}