diff options
Diffstat (limited to 'container-core/src/main/java/com/yahoo/container/core')
2 files changed, 6 insertions, 14 deletions
diff --git a/container-core/src/main/java/com/yahoo/container/core/config/HandlersConfigurerDi.java b/container-core/src/main/java/com/yahoo/container/core/config/HandlersConfigurerDi.java index e2c6da6fab8..55d7de90f33 100644 --- a/container-core/src/main/java/com/yahoo/container/core/config/HandlersConfigurerDi.java +++ b/container-core/src/main/java/com/yahoo/container/core/config/HandlersConfigurerDi.java @@ -86,11 +86,7 @@ public class HandlersConfigurerDi { osgiWrapper = new OsgiWrapper(osgiFramework, vespaContainer.getBundleLoader()); container = new Container(subscriberFactory, configId, deconstructor, osgiWrapper); - try { - getNewComponentGraph(discInjector, false); - } catch (InterruptedException e) { - throw new RuntimeException("Interrupted while setting up handlers for the first time."); - } + getNewComponentGraph(discInjector, false); } private static class OsgiWrapper extends OsgiImpl implements com.yahoo.container.di.Osgi { @@ -139,10 +135,10 @@ public class HandlersConfigurerDi { /** * Wait for new config to arrive and produce the new graph */ - public void getNewComponentGraph(Injector discInjector, boolean restartOnRedeploy) throws InterruptedException { - currentGraph = container.getNewComponentGraph(currentGraph, createFallbackInjector(vespaContainer, discInjector), restartOnRedeploy); - - assert (currentGraph.getInstance(RegistriesHack.class) != null); // TODO: Remove, seems quite pointless? + public void getNewComponentGraph(Injector discInjector, boolean restartOnRedeploy) { + currentGraph = container.getNewComponentGraph(currentGraph, + createFallbackInjector(vespaContainer, discInjector), + restartOnRedeploy); } @SuppressWarnings("deprecation") diff --git a/container-core/src/main/java/com/yahoo/container/core/config/testutil/HandlersConfigurerTestWrapper.java b/container-core/src/main/java/com/yahoo/container/core/config/testutil/HandlersConfigurerTestWrapper.java index 033a5819585..42780f75a6c 100644 --- a/container-core/src/main/java/com/yahoo/container/core/config/testutil/HandlersConfigurerTestWrapper.java +++ b/container-core/src/main/java/com/yahoo/container/core/config/testutil/HandlersConfigurerTestWrapper.java @@ -111,11 +111,7 @@ public class HandlersConfigurerTestWrapper { public void reloadConfig() { configurer.reloadConfig(++lastGeneration); - try { - configurer.getNewComponentGraph(Guice.createInjector(), false); - } catch (InterruptedException e) { - throw new RuntimeException(e); - } + configurer.getNewComponentGraph(Guice.createInjector(), false); } public void shutdown() { |