commit | d98e08a5c8eb9548b32c0fed96c0e3108095acd8 | [log] [tgz] |
---|---|---|
author | Richard S. Hall <rickhall@apache.org> | Thu Jun 29 14:46:15 2006 +0000 |
committer | Richard S. Hall <rickhall@apache.org> | Thu Jun 29 14:46:15 2006 +0000 |
tree | 905f96bf3d83066b22e212f5ffc52a1bf56805cd | |
parent | 514bc668e9a6a1c3cfd019c3bbe1974893777e8e [diff] |
Added a private getContext() method so that it is possible to run Equinox' Declarative Services impl on Felix. git-svn-id: https://svn.apache.org/repos/asf/incubator/felix/trunk@418060 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/org.apache.felix.framework/src/main/java/org/apache/felix/framework/BundleImpl.java b/org.apache.felix.framework/src/main/java/org/apache/felix/framework/BundleImpl.java index dcb81d4..0bf5448 100644 --- a/org.apache.felix.framework/src/main/java/org/apache/felix/framework/BundleImpl.java +++ b/org.apache.felix.framework/src/main/java/org/apache/felix/framework/BundleImpl.java
@@ -50,6 +50,22 @@ m_info = info; } + /** + * This method is a hack to make Felix compatible with Equinox' + * Declarative Services implementation; this should be revisited + * in the future. + * @return the bundle context associated with this bundle. + **/ + private BundleContext getContext() + { + BundleContext bc = m_info.getContext(); + if (bc == null) + { + m_info.setContext(new BundleContextImpl(m_felix, this)); + } + return m_info.getContext(); + } + public long getBundleId() { return m_info.getBundleId();