From 0a73fdd941994cbeb5ac3f09dfc7f640ed661669 Mon Sep 17 00:00:00 2001 From: gjoranv Date: Fri, 6 Jan 2023 10:24:00 +0100 Subject: Add more improvements to bundle resolution error message: - Add already installed bundles with same symbolic name. - Only include message for version qualifier if relevant. --- container-core/src/main/java/com/yahoo/osgi/OsgiImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'container-core/src/main/java/com/yahoo/osgi') diff --git a/container-core/src/main/java/com/yahoo/osgi/OsgiImpl.java b/container-core/src/main/java/com/yahoo/osgi/OsgiImpl.java index f0f9de9fe36..7d5f1472e45 100644 --- a/container-core/src/main/java/com/yahoo/osgi/OsgiImpl.java +++ b/container-core/src/main/java/com/yahoo/osgi/OsgiImpl.java @@ -88,10 +88,10 @@ public class OsgiImpl implements Osgi { throw new IllegalArgumentException( "Could not create a component with id '" + spec.classId.getName() + "'. Tried to load class directly, since no bundle was found for spec: " + spec.bundle + - ". " + bundleResolutionErrorMessage()); + ". " + bundleResolutionErrorMessage(spec.bundle)); } - protected String bundleResolutionErrorMessage() { + protected String bundleResolutionErrorMessage(ComponentSpecification bundleSpec) { return " If a bundle with the same name is installed, there is a either a version mismatch " + "or the installed bundle's version contains a qualifier string."; } -- cgit v1.2.3