Repository: camel
Updated Branches:
  refs/heads/master 97bf45b28 -> 90121e537


[CAMEL-9048] Special handling for camel-core


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/90121e53
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/90121e53
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/90121e53

Branch: refs/heads/master
Commit: 90121e5377106348b61a6ddab9d2b3050454ea5e
Parents: 97bf45b
Author: Christian Schneider <ch...@die-schneider.net>
Authored: Wed Aug 5 17:47:29 2015 +0200
Committer: Christian Schneider <ch...@die-schneider.net>
Committed: Wed Aug 5 17:53:25 2015 +0200

----------------------------------------------------------------------
 .../src/main/java/org/apache/camel/impl/osgi/Activator.java      | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/90121e53/camel-core/src/main/java/org/apache/camel/impl/osgi/Activator.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/impl/osgi/Activator.java 
b/camel-core/src/main/java/org/apache/camel/impl/osgi/Activator.java
index 354232b..6457747 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/osgi/Activator.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/osgi/Activator.java
@@ -237,6 +237,10 @@ public class Activator implements BundleActivator, 
BundleTrackerCustomizer {
      * Check if bundle can see the given class
      */
     protected boolean canSee(Bundle bundle, Class<?> clazz) {
+        if (bundle.getBundleId() == bundleId) {
+            // Need extra handling of camel core as it does not import the api
+            return true;
+        }
         BundleCapability packageCap = 
packageCapabilities.get(clazz.getPackage().getName());
         BundleWiring wiring = bundle.adapt(BundleWiring.class);
         List<BundleWire> imports = wiring.getRequiredWires(PACKAGE_NAMESPACE);

Reply via email to