summaryrefslogtreecommitdiffstats
path: root/container-core
diff options
context:
space:
mode:
authorgjoranv <gjoranv@gmail.com>2023-01-10 14:22:50 +0100
committerGitHub <noreply@github.com>2023-01-10 14:22:50 +0100
commit9a706111adb61ba985ce0766f6d39b3b66aad3b3 (patch)
tree673717deb918b2080b238b930d8f44e6a782d74d /container-core
parent62ebb8ba050912f4f13d97f5ac4cf02e4c4c415f (diff)
parent0aa2269f12496a77df6d9271cde088c4460dedf4 (diff)
Merge pull request #25475 from vespa-engine/skip-fallback-class-resolution-for-explicit-bundle_2
Skip fallback class resolution for explicit bundle 2 [run-systemtest]
Diffstat (limited to 'container-core')
-rw-r--r--container-core/src/main/java/com/yahoo/osgi/OsgiImpl.java5
1 files changed, 5 insertions, 0 deletions
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 4acdc3d544b..9d023e2a7ca 100644
--- a/container-core/src/main/java/com/yahoo/osgi/OsgiImpl.java
+++ b/container-core/src/main/java/com/yahoo/osgi/OsgiImpl.java
@@ -62,6 +62,11 @@ public class OsgiImpl implements Osgi {
if (bundle != null) {
return resolveFromBundle(spec, bundle);
} else {
+ if (jdiscOsgi.isFelixFramework() && ! spec.bundle.equals(spec.classId)) {
+ // Bundle was explicitly specified, but not found.
+ throw new IllegalArgumentException("Could not find bundle " + spec.bundle + " to create a component with class '"
+ + spec.classId.getName() + ". " + bundleResolutionErrorMessage(spec.bundle));
+ }
return resolveFromThisBundleOrSystemBundle(spec);
}
}