OSGi R4.1 adds a new Bundle.getBundleContext() method, which I needed
because I updated to the latest TCK, which requires it. As a quick hack
I added this method to Bundle and renamed the existing method in 
BundleImpl. We will replace my hacked Bundle with the officially updated 
Bundle source once OSGi releases it.


git-svn-id: https://svn.apache.org/repos/asf/incubator/felix/trunk@513962 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/framework/src/main/java/org/apache/felix/framework/BundleImpl.java b/framework/src/main/java/org/apache/felix/framework/BundleImpl.java
index eefa16c..69e89ce 100644
--- a/framework/src/main/java/org/apache/felix/framework/BundleImpl.java
+++ b/framework/src/main/java/org/apache/felix/framework/BundleImpl.java
@@ -52,7 +52,7 @@
         m_info = info;
     }
 
-    private BundleContext getContext()
+    public BundleContext getBundleContext()
     {
         return m_info.getContext();
     }
diff --git a/org.osgi.core/src/main/java/org/osgi/framework/Bundle.java b/org.osgi.core/src/main/java/org/osgi/framework/Bundle.java
index 675f3e0..5811258 100644
--- a/org.osgi.core/src/main/java/org/osgi/framework/Bundle.java
+++ b/org.osgi.core/src/main/java/org/osgi/framework/Bundle.java
@@ -546,6 +546,8 @@
 	 */
 	public Dictionary getHeaders();
 
+	public BundleContext getBundleContext();
+
 	/**
 	 * Returns this bundle's identifier. The bundle is assigned a unique
 	 * identifier by the Framework when it is installed in the OSGi environment.