diff options
Diffstat (limited to 'container-core/src/main/java/com/yahoo/container/core/config')
2 files changed, 0 insertions, 48 deletions
diff --git a/container-core/src/main/java/com/yahoo/container/core/config/ApplicationBundleLoader.java b/container-core/src/main/java/com/yahoo/container/core/config/ApplicationBundleLoader.java index 7311641b1bd..cf3db91239a 100644 --- a/container-core/src/main/java/com/yahoo/container/core/config/ApplicationBundleLoader.java +++ b/container-core/src/main/java/com/yahoo/container/core/config/ApplicationBundleLoader.java @@ -3,7 +3,6 @@ package com.yahoo.container.core.config; import com.yahoo.config.FileReference; import com.yahoo.container.di.Osgi.GenerationStatus; -import com.yahoo.jdisc.application.BsnVersion; import com.yahoo.osgi.Osgi; import org.osgi.framework.Bundle; @@ -15,7 +14,6 @@ import java.util.List; import java.util.Map; import java.util.Set; import java.util.logging.Logger; -import java.util.stream.Collectors; /** * Manages the set of installed and active/inactive bundles. @@ -51,14 +49,6 @@ public class ApplicationBundleLoader { } /** - * Returns bsn:version for all active bundles. - */ - public synchronized List<BsnVersion> activeBundlesBsnVersion() { - return activeBundles.values().stream().map(BsnVersion::new) - .collect(Collectors.toList()); - } - - /** * Installs the given set of bundles and updates state for which bundles and file references * that are active or should be uninstalled in case of success or failure. */ 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 13c07ffb14b..e2f97c9ad6b 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 @@ -4,7 +4,6 @@ package com.yahoo.container.core.config; import com.google.inject.AbstractModule; import com.google.inject.Injector; import com.yahoo.component.AbstractComponent; -import com.yahoo.component.ComponentSpecification; import com.yahoo.component.annotation.Inject; import com.yahoo.component.provider.ComponentRegistry; import com.yahoo.concurrent.ThreadFactoryFactory; @@ -16,24 +15,20 @@ import com.yahoo.container.di.config.SubscriberFactory; import com.yahoo.container.logging.AccessLog; import com.yahoo.filedistribution.fileacquirer.FileAcquirer; import com.yahoo.jdisc.application.OsgiFramework; -import com.yahoo.jdisc.application.BsnVersion; import com.yahoo.jdisc.handler.RequestHandler; import com.yahoo.jdisc.service.ClientProvider; import com.yahoo.jdisc.service.ServerProvider; import com.yahoo.osgi.OsgiImpl; import com.yahoo.osgi.OsgiWrapper; import org.osgi.framework.Bundle; -import org.osgi.framework.Version; import java.util.ArrayList; import java.util.Collection; -import java.util.List; import java.util.Set; import java.util.concurrent.Executor; import java.util.concurrent.Executors; import java.util.logging.Level; import java.util.logging.Logger; -import java.util.stream.Collectors; /** * For internal use only. @@ -112,39 +107,6 @@ public class HandlersConfigurerDi { public Set<Bundle> completeBundleGeneration(GenerationStatus status) { return applicationBundleLoader.completeGeneration(status); } - - @Override - protected String bundleResolutionErrorMessage(ComponentSpecification bundleSpec) { - List<BsnVersion> activeBundles = applicationBundleLoader.activeBundlesBsnVersion(); - List<Version> activeVersions = activeVersionsOfBundle(bundleSpec, activeBundles); - - String versionsMessage = ""; - if (activeVersions.size() == 1) { - versionsMessage = "There is an installed bundle with the same name with version: " + activeVersions.get(0); - } else if (activeVersions.size() > 1) { - versionsMessage = "There are installed bundles with the same name with versions: " + activeVersions; - } - if (qualifierIsUsed(bundleSpec, activeVersions)) { - versionsMessage += " Note that qualifier strings must be matched exactly"; - } - return String.format("%s. Installed application bundles: [%s]", - versionsMessage, - activeBundles.stream() - .map(BsnVersion::toReadableString) - .collect(Collectors.joining(", "))); - } - - private static boolean qualifierIsUsed(ComponentSpecification bundleSpec, List<Version> activeVersions) { - return ! bundleSpec.getVersionSpecification().getQualifier().isEmpty() || - activeVersions.stream().anyMatch(version -> ! version.getQualifier().isEmpty()); - } - - private static List<Version> activeVersionsOfBundle(ComponentSpecification bundleSpec, List<BsnVersion> activeBundles) { - return activeBundles.stream() - .filter(bundle -> bundle.symbolicName().equals(bundleSpec.getName())) - .map(BsnVersion::version) - .collect(Collectors.toList()); - } } /** |