diff options
author | gjoranv <gjoranv@gmail.com> | 2023-01-10 14:22:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-10 14:22:50 +0100 |
commit | 9a706111adb61ba985ce0766f6d39b3b66aad3b3 (patch) | |
tree | 673717deb918b2080b238b930d8f44e6a782d74d /container-core | |
parent | 62ebb8ba050912f4f13d97f5ac4cf02e4c4c415f (diff) | |
parent | 0aa2269f12496a77df6d9271cde088c4460dedf4 (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.java | 5 |
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); } } |