aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject svn commit: r1600853 - in /aries/trunk/subsystem/subsystem-itests: ./ src/test/java/org/apache/aries/subsystem/ctt/itests/ src/test/java/org/apache/aries/subsystem/itests/ src/test/java/org/apache/aries/subsystem/itests/util/
Date Fri, 06 Jun 2014 11:51:53 GMT
Author: jbonofre
Date: Fri Jun  6 11:51:52 2014
New Revision: 1600853

URL: http://svn.apache.org/r1600853
Log:
Fix compilation on subsystem itests

Modified:
    aries/trunk/subsystem/subsystem-itests/pom.xml
    aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/ctt/itests/SubsystemDependencyTestBase.java
    aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/BasicTest.java
    aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/BundleEventHookTest.java
    aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/DynamicImportTest.java
    aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/HelloWorldTest.java
    aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/SubsystemTest.java
    aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/util/RepositoryGenerator.java
    aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/util/Utils.java

Modified: aries/trunk/subsystem/subsystem-itests/pom.xml
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-itests/pom.xml?rev=1600853&r1=1600852&r2=1600853&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-itests/pom.xml (original)
+++ aries/trunk/subsystem/subsystem-itests/pom.xml Fri Jun  6 11:51:52 2014
@@ -304,11 +304,6 @@
             </exclusions>
         </dependency>
         <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
             <groupId>org.eclipse</groupId>
             <artifactId>org.eclipse.osgi</artifactId>
             <version>3.8.0.v20120529-1548</version>

Modified: aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/ctt/itests/SubsystemDependencyTestBase.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/ctt/itests/SubsystemDependencyTestBase.java?rev=1600853&r1=1600852&r2=1600853&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/ctt/itests/SubsystemDependencyTestBase.java
(original)
+++ aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/ctt/itests/SubsystemDependencyTestBase.java
Fri Jun  6 11:51:52 2014
@@ -163,7 +163,7 @@ public abstract class SubsystemDependenc
 		Bundle wiredBundle = context(s).getBundleByName(wiredBundleName);
 		assertNotNull ("Bundle not found", wiredBundleName);
 
-		BundleWiring wiring = wiredBundle.adapt(BundleWiring.class);
+		BundleWiring wiring = (BundleWiring) wiredBundle.adapt(BundleWiring.class);
 		List<BundleWire> wiredPackages = wiring.getRequiredWires(PACKAGE_NAMESPACE);
 		assertEquals ("Only one package expected", 1, wiredPackages.size());
 		
@@ -187,7 +187,7 @@ public abstract class SubsystemDependenc
 		Bundle wiredBundle = context(s).getBundleByName(BUNDLE_D);
 		assertNotNull ("Target bundle " + wiredBundleName + " not found", wiredBundle);
 	
-		BundleWiring wiring = wiredBundle.adapt(BundleWiring.class);
+		BundleWiring wiring = (BundleWiring) wiredBundle.adapt(BundleWiring.class);
 		List<BundleWire> wiredBundles = wiring.getRequiredWires(BUNDLE_NAMESPACE);
 		assertEquals ("Only one bundle expected", 1, wiredBundles.size());
 	
@@ -213,7 +213,7 @@ public abstract class SubsystemDependenc
 		Bundle wiredBundle = context(s).getBundleByName(wiredBundleName);
 		assertNotNull ("Targt bundle " + wiredBundleName + " not found", wiredBundleName);
 		
-		BundleWiring wiring = wiredBundle.adapt(BundleWiring.class);
+		BundleWiring wiring = (BundleWiring) wiredBundle.adapt(BundleWiring.class);
 		List<BundleWire> wiredProviders = wiring.getRequiredWires(namespace);
 		assertEquals("Only one wire for capability namespace " + namespace +" expected", 
 				1, wiredProviders.size());

Modified: aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/BasicTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/BasicTest.java?rev=1600853&r1=1600852&r2=1600853&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/BasicTest.java
(original)
+++ aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/BasicTest.java
Fri Jun  6 11:51:52 2014
@@ -51,9 +51,9 @@ public class BasicTest extends Subsystem
     		}
     	}
     	assertTrue("Subsystems implementation bundle not found", found);
-    	ServiceReference<Subsystem> serviceReference = bundleContext.getServiceReference(Subsystem.class);
+    	ServiceReference serviceReference = bundleContext.getServiceReference(Subsystem.class);
     	assertNotNull("Reference to subsystem service not found", serviceReference);
-    	Subsystem subsystem = bundleContext.getService(serviceReference);
+    	Subsystem subsystem = (Subsystem) bundleContext.getService(serviceReference);
     	assertNotNull("Subsystem service not found", subsystem);
     }
     

Modified: aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/BundleEventHookTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/BundleEventHookTest.java?rev=1600853&r1=1600852&r2=1600853&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/BundleEventHookTest.java
(original)
+++ aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/BundleEventHookTest.java
Fri Jun  6 11:51:52 2014
@@ -151,7 +151,7 @@ public class BundleEventHookTest extends
 						if (a.get() != null)
 							// We've been here before and already done what needs doing.
 							return;
-						ServiceReference<Subsystem> sr = (ServiceReference<Subsystem>)event.getServiceReference();
+						ServiceReference sr = (ServiceReference)event.getServiceReference();
 						bundleContext.getService(sr);
 						try {
 							// Queue up the installed event.
@@ -205,7 +205,7 @@ public class BundleEventHookTest extends
 						if (a.get() != null)
 							// We've been here before and already done what needs doing.
 							return;
-						ServiceReference<Subsystem> sr = (ServiceReference<Subsystem>)event.getServiceReference();
+						ServiceReference sr = (ServiceReference)event.getServiceReference();
 						bundleContext.getService(sr);
 						try {
 							// Queue up the installed event for bundle A using B's context.

Modified: aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/DynamicImportTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/DynamicImportTest.java?rev=1600853&r1=1600852&r2=1600853&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/DynamicImportTest.java
(original)
+++ aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/DynamicImportTest.java
Fri Jun  6 11:51:52 2014
@@ -82,7 +82,7 @@ public class DynamicImportTest extends S
 	{
 		Dictionary<String, String> props = new Hashtable<String, String>();
 		props.put("osgi.woven.packages", "some.woven.package, org.apache.aries.subsystem.itests.hello.api");
-		ServiceRegistration<?> sr = bundleContext.registerService(WeavingHook.class, new
TokenWeaver(), props);
+		ServiceRegistration sr = bundleContext.registerService(WeavingHook.class, new TokenWeaver(),
props);
 		try { 
 			Subsystem subsystem = installSubsystemFromFile ("dynamicImport.esa");
 			startSubsystem(subsystem);
@@ -138,7 +138,7 @@ public class DynamicImportTest extends S
 		final AtomicBoolean weavingHookCalled = new AtomicBoolean(false);
 		Dictionary<String, Object> props = new Hashtable<String, Object>();
 		props.put("osgi.woven.packages", "org.osgi.framework");
-		ServiceRegistration<WeavingHook> reg = bundleContext.registerService(
+		ServiceRegistration reg = bundleContext.registerService(
 				WeavingHook.class, 
 				new WeavingHook() {
 					@Override

Modified: aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/HelloWorldTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/HelloWorldTest.java?rev=1600853&r1=1600852&r2=1600853&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/HelloWorldTest.java
(original)
+++ aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/HelloWorldTest.java
Fri Jun  6 11:51:52 2014
@@ -89,7 +89,7 @@ public class HelloWorldTest extends Subs
     // IDirectoryFinder services, so it will be notified on service registration. 
     Dictionary<String, String> properties = new Hashtable<String, String>();
     properties.put(IDirectoryFinder.IDIR_FINDERID_KEY, TestIDirectoryFinder.IDIR_FINDERID_VALUE);
-    ServiceRegistration<IDirectoryFinder> serviceRegistration = 
+    ServiceRegistration serviceRegistration =
      bundleContext.registerService(IDirectoryFinder.class, new TestIDirectoryFinder(), properties);
     
     // Call the SubsystemTest.installSubsystem method that does not create a URL

Modified: aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/SubsystemTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/SubsystemTest.java?rev=1600853&r1=1600852&r2=1600853&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/SubsystemTest.java
(original)
+++ aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/SubsystemTest.java
Fri Jun  6 11:51:52 2014
@@ -245,7 +245,7 @@ public abstract class SubsystemTest exte
 	
 	protected final SubsystemEventHandler subsystemEvents = new SubsystemEventHandler();
 	
-	protected Collection<ServiceRegistration<?>> serviceRegistrations = new ArrayList<ServiceRegistration<?>>();
+	protected Collection<ServiceRegistration> serviceRegistrations = new ArrayList<ServiceRegistration>();
 	
 	@Before
 	public void setUp() throws Exception {
@@ -268,7 +268,7 @@ public abstract class SubsystemTest exte
 	public void tearDown() throws Exception 
 	{
 		bundleContext.removeServiceListener(subsystemEvents);
-		for (ServiceRegistration<?> registration : serviceRegistrations)
+		for (ServiceRegistration registration : serviceRegistrations)
 			Utils.unregisterQuietly(registration);
 		serviceRegistrations.clear();
 	}
@@ -463,7 +463,7 @@ public abstract class SubsystemTest exte
 	protected void assertRefresh(Collection<Bundle> bundles) throws InterruptedException
{
 		FrameworkWiring wiring = getSystemBundleAsFrameworkWiring();
 		final AtomicBoolean refreshed = new AtomicBoolean(false);
-		wiring.refreshBundles(bundles, new FrameworkListener() {
+		wiring.refreshBundles(bundles, new FrameworkListener[]{ new FrameworkListener() {
 			@Override
 			public void frameworkEvent(FrameworkEvent event) {
 				if (FrameworkEvent.PACKAGES_REFRESHED == event.getType()) {
@@ -473,7 +473,7 @@ public abstract class SubsystemTest exte
 					}
 				}
 			}
-		});
+		}});
 		synchronized (refreshed) {
 			refreshed.wait(5000);
 		}
@@ -527,7 +527,7 @@ public abstract class SubsystemTest exte
 	
 	protected void assertStartLevel(Bundle bundle, int expected) {
 		assertNotNull("Bundle is null", bundle);
-		assertEquals("Wrong start level", expected, bundle.adapt(BundleStartLevel.class).getStartLevel());
+		assertEquals("Wrong start level", expected, ((BundleStartLevel) bundle.adapt(BundleStartLevel.class)).getStartLevel());
 	}
 	
 	protected void assertState(State expected, State actual) {
@@ -796,11 +796,11 @@ public abstract class SubsystemTest exte
 	}
 	
 	protected FrameworkStartLevel getSystemBundleAsFrameworkStartLevel() {
-		return getSystemBundle().adapt(FrameworkStartLevel.class);
+		return (FrameworkStartLevel) getSystemBundle().adapt(FrameworkStartLevel.class);
 	}
 	
 	protected FrameworkWiring getSystemBundleAsFrameworkWiring() {
-		return getSystemBundle().adapt(FrameworkWiring.class);
+		return (FrameworkWiring) getSystemBundle().adapt(FrameworkWiring.class);
 	}
 	
 	protected Bundle getSubsystemCoreBundle() {

Modified: aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/util/RepositoryGenerator.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/util/RepositoryGenerator.java?rev=1600853&r1=1600852&r2=1600853&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/util/RepositoryGenerator.java
(original)
+++ aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/util/RepositoryGenerator.java
Fri Jun  6 11:51:52 2014
@@ -129,7 +129,7 @@ public class RepositoryGenerator {
 
 	private void registerOBR() {
         // set repositoryAdmin
-        ServiceReference<RepositoryAdmin> ref = context.getServiceReference(RepositoryAdmin.class);
+        ServiceReference ref = context.getServiceReference(RepositoryAdmin.class);
         
         if (ref != null) {
             this.repositoryAdmin = (RepositoryAdmin) context.getService(ref);

Modified: aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/util/Utils.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/util/Utils.java?rev=1600853&r1=1600852&r2=1600853&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/util/Utils.java
(original)
+++ aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/util/Utils.java
Fri Jun  6 11:51:52 2014
@@ -26,7 +26,7 @@ public class Utils {
 		catch (Exception e) {}
 	}
 	
-	public static void unregisterQuietly(ServiceRegistration<?> reg) {
+	public static void unregisterQuietly(ServiceRegistration reg) {
 		if (reg == null) return;
 		try {
 			reg.unregister();



Mime
View raw message