diff options
author | Jon Bratseth <bratseth@oath.com> | 2018-12-03 18:14:06 -0800 |
---|---|---|
committer | Jon Bratseth <bratseth@oath.com> | 2018-12-03 18:14:06 -0800 |
commit | 230233bbc4c92ffddfe9cf1d7b40af7e8f98b1e1 (patch) | |
tree | a49a94d149c0c8d9130b9ba58e238c3d1db16cf1 /container-core/src | |
parent | 97f154211d3784bbe3467f18e6475c2c548693eb (diff) |
Less use of Container
Diffstat (limited to 'container-core/src')
3 files changed, 6 insertions, 3 deletions
diff --git a/container-core/src/main/java/com/yahoo/container/Container.java b/container-core/src/main/java/com/yahoo/container/Container.java index c83dd2199ea..bb4b57e8983 100755 --- a/container-core/src/main/java/com/yahoo/container/Container.java +++ b/container-core/src/main/java/com/yahoo/container/Container.java @@ -41,6 +41,8 @@ public class Container { public static Container get() { return instance; } + /** @deprecated do not use */ + @Deprecated // TODO: Remove public void setOsgi(Osgi osgi) { bundleLoader = new BundleLoader(osgi); } @@ -55,6 +57,8 @@ public class Container { return fileAcquirer; } + /** @deprecated do not use */ + @Deprecated // TODO: Remove public BundleLoader getBundleLoader() { if (bundleLoader == null) bundleLoader = new BundleLoader(null); @@ -65,7 +69,7 @@ public class Container { * Hack. For internal use only, will be removed later * * Used by Application to be able to repeatedly set up containers. - **/ + */ public static void resetInstance() { instance = new Container(); } 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 7f6e7f08e3d..f7a3f49538e 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 @@ -83,7 +83,7 @@ public class HandlersConfigurerDi { OsgiFramework osgiFramework) { this.vespaContainer = vespaContainer; - osgiWrapper = new OsgiWrapper(osgiFramework, vespaContainer.getBundleLoader()); + osgiWrapper = new OsgiWrapper(osgiFramework, new BundleLoader(new OsgiImpl(osgiFramework))); container = new Container(subscriberFactory, configId, deconstructor, osgiWrapper); getNewComponentGraph(discInjector, false); 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 ad99218b860..1c3b9088a95 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 @@ -90,7 +90,6 @@ public class HandlersConfigurerTestWrapper { public HandlersConfigurerTestWrapper(Container container, String configId) { createFiles(configId); MockOsgi mockOsgi = new MockOsgi(); - container.setOsgi(mockOsgi); ComponentDeconstructor testDeconstructor = getTestDeconstructor(); configurer = new HandlersConfigurerDi( new CloudSubscriberFactory(configSources), |