Reuse BundleContext from the "context" attribute (from superclass).


git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1530212 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/AspectRaceTest.java b/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/AspectRaceTest.java
index 72961c8..96801b8 100644
--- a/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/AspectRaceTest.java
+++ b/dependencymanager/test2/src/test/java/org/apache/felix/dependencymanager/test2/integration/api/AspectRaceTest.java
@@ -26,8 +26,6 @@
 import java.util.concurrent.Executors;
 import java.util.concurrent.TimeUnit;
 
-import javax.inject.Inject;
-
 import junit.framework.Assert;
 
 import org.apache.felix.dependencymanager.test2.components.Ensure;
@@ -37,7 +35,6 @@
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.ops4j.pax.exam.junit.PaxExam;
-import org.osgi.framework.BundleContext;
 import org.osgi.framework.InvalidSyntaxException;
 import org.osgi.framework.ServiceReference;
 
@@ -49,9 +46,6 @@
 	final static int SERVICES = 3;
 	final static int ASPECTS_PER_SERVICE = 10;
 
-	@Inject
-	private static volatile BundleContext _bctx;
-
 	@Test
 	public void testConcurrentAspects() {
 		try {
@@ -66,7 +60,7 @@
 			// We create a Controller which is injected with some S services,
 			// and each S services has some aspects (SAspect).
 
-			_dm = new DependencyManager(_bctx);
+			_dm = new DependencyManager(context);
 			Controller controller = new Controller();
 			Component c = _dm
 					.createComponent()
@@ -237,7 +231,7 @@
 						"could not unregister services and aspects timely");
 			}
 
-			if (_bctx.getServiceReference(S.class.getName()) != null) {
+			if (context.getServiceReference(S.class.getName()) != null) {
 				error("could not unregister some services or aspects !");
 			}
 			debug("unregistered all aspects and services concurrently");