aboutsummaryrefslogtreecommitdiffstats
path: root/container-core/src/main/java/com/yahoo/osgi/OsgiImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'container-core/src/main/java/com/yahoo/osgi/OsgiImpl.java')
-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..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);
}
}