diff options
author | gjoranv <gjoranv@gmail.com> | 2023-01-10 00:47:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-10 00:47:27 +0100 |
commit | 32dd3bc3f8497a102e47f1fb546658e2f055ef40 (patch) | |
tree | 81351aeae77e142146d852f03d952c7d3714b61e | |
parent | 57a96d0006038bec9a35ab42ed761ccf1b198bf2 (diff) | |
parent | 5012b179a1ae8b2e0a036464241241722ce37587 (diff) |
Merge pull request #25467 from vespa-engine/skip-fallback-class-resolution-for-explicit-bundle
Don't attempt to lookup class in internal bundles if a bundle was exp…
-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..11041f6a5c0 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 + + ". " + bundleResolutionErrorMessage(spec.bundle)); + } return resolveFromThisBundleOrSystemBundle(spec); } } |