diff options
author | gjoranv <gv@verizonmedia.com> | 2021-07-14 18:24:05 +0200 |
---|---|---|
committer | gjoranv <gv@verizonmedia.com> | 2021-07-14 18:24:05 +0200 |
commit | a9b25abb250d6d1f1145882017241c30a7fcb447 (patch) | |
tree | 3b39a3bc744756fcb4310f370c2a60915701fe13 /container-core/src/main/java/com/yahoo/container/core | |
parent | 34f4fa288380263975dd1b45b54847c36c6b6745 (diff) |
Remove Jersey related code from the container osgi layer.
Diffstat (limited to 'container-core/src/main/java/com/yahoo/container/core')
-rw-r--r-- | container-core/src/main/java/com/yahoo/container/core/config/HandlersConfigurerDi.java | 27 |
1 files changed, 0 insertions, 27 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 08a468a3031..1d63fb2312a 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 @@ -5,7 +5,6 @@ import com.google.inject.AbstractModule; import com.google.inject.Inject; import com.google.inject.Injector; import com.yahoo.component.AbstractComponent; -import com.yahoo.component.ComponentSpecification; import com.yahoo.component.provider.ComponentRegistry; import com.yahoo.concurrent.ThreadFactoryFactory; import com.yahoo.config.FileReference; @@ -13,8 +12,6 @@ import com.yahoo.container.di.ComponentDeconstructor; import com.yahoo.container.di.Container; import com.yahoo.container.di.componentgraph.core.ComponentGraph; import com.yahoo.container.di.config.SubscriberFactory; -import com.yahoo.container.di.osgi.BundleClasses; -import com.yahoo.container.di.osgi.OsgiUtil; import com.yahoo.container.logging.AccessLog; import com.yahoo.filedistribution.fileacquirer.FileAcquirer; import com.yahoo.jdisc.application.OsgiFramework; @@ -25,7 +22,6 @@ import com.yahoo.osgi.OsgiImpl; import com.yahoo.osgi.OsgiWrapper; import com.yahoo.statistics.Statistics; import org.osgi.framework.Bundle; -import org.osgi.framework.wiring.BundleWiring; import java.util.ArrayList; import java.util.Collection; @@ -35,8 +31,6 @@ import java.util.concurrent.Executors; import java.util.logging.Level; import java.util.logging.Logger; -import static com.yahoo.collections.CollectionUtil.first; - /** * For internal use only. * @@ -94,27 +88,6 @@ public class HandlersConfigurerDi { platformBundleLoader = new PlatformBundleLoader(this); } - - // TODO Vespa 8: Remove, only used for Jersey - @Override - public BundleClasses getBundleClasses(ComponentSpecification bundleSpec, Set<String> packagesToScan) { - //Temporary hack: Using class name since ClassLoaderOsgiFramework is not available at compile time in this bundle. - if (osgiFramework.getClass().getName().equals("com.yahoo.application.container.impl.ClassLoaderOsgiFramework")) { - Bundle syntheticClassPathBundle = first(osgiFramework.bundles()); - ClassLoader classLoader = syntheticClassPathBundle.adapt(BundleWiring.class).getClassLoader(); - - return new BundleClasses( - syntheticClassPathBundle, - OsgiUtil.getClassEntriesForBundleUsingProjectClassPathMappings(classLoader, bundleSpec, packagesToScan)); - } else { - Bundle bundle = getBundle(bundleSpec); - if (bundle == null) - throw new RuntimeException("No bundle matching '" + bundleSpec + "'"); - - return new BundleClasses(bundle, OsgiUtil.getClassEntriesInBundleClassPath(bundle, packagesToScan)); - } - } - @Override public void installPlatformBundles(Collection<String> bundlePaths) { // Don't install physical bundles for test frameworks, where all platform bundles are on the classpath. |