fixed bug in adapter annotations: the services provided by adapters were specified as a Class, instead of a Class array.

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@937773 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/dependencymanager/runtime/src/main/java/org/apache/felix/dm/runtime/ComponentManager.java b/dependencymanager/runtime/src/main/java/org/apache/felix/dm/runtime/ComponentManager.java
index 31356c2..ea95cc6 100644
--- a/dependencymanager/runtime/src/main/java/org/apache/felix/dm/runtime/ComponentManager.java
+++ b/dependencymanager/runtime/src/main/java/org/apache/felix/dm/runtime/ComponentManager.java
@@ -364,12 +364,12 @@
         throws ClassNotFoundException
     {
         Class<?> adapterImpl = b.loadClass(parser.getString(DescriptorParam.impl));
-        Class<?> adapterService = b.loadClass(parser.getString(DescriptorParam.adapterService));
+        String[] adapterService = parser.getStrings(DescriptorParam.adapterService, null);
         Dictionary<String, String> adapterProperties = parser.getDictionary(DescriptorParam.adapterProperties, null);
         Class<?> adapteeService = b.loadClass(parser.getString(DescriptorParam.adapteeService));
         String adapteeFilter = parser.getString(DescriptorParam.adapteeFilter, null);
      
-        Service service = dm.createAdapterService(adapteeService, adapteeFilter, adapterService.getName(), adapterImpl, adapterProperties);
+        Service service = dm.createAdapterService(adapteeService, adapteeFilter, adapterService, adapterImpl, adapterProperties);
         setCommonServiceParams(service, parser);
         return service;
     }
@@ -387,7 +387,7 @@
         int stateMask = parser.getInt(DescriptorParam.stateMask, Bundle.INSTALLED | Bundle.RESOLVED | Bundle.ACTIVE);
         String filter = parser.getString(DescriptorParam.filter, null);
         Class<?> adapterImpl = b.loadClass(parser.getString(DescriptorParam.impl));
-        String service = parser.getString(DescriptorParam.service);
+        String service = parser.getString(DescriptorParam.service, null);
         Dictionary<String, String> properties = parser.getDictionary(DescriptorParam.properties, null);
         boolean propagate = "true".equals(parser.getString(DescriptorParam.propagate, "false"));
         Service srv = dm.createBundleAdapterService(stateMask, filter, adapterImpl, service, properties, propagate);  
@@ -407,11 +407,10 @@
     {
         String filter = parser.getString(DescriptorParam.filter, null);
         Class<?> impl = b.loadClass(parser.getString(DescriptorParam.impl));
-        String service = parser.getString(DescriptorParam.service);
-        Class<?> serviceClass = b.loadClass(service);
+        String service = parser.getString(DescriptorParam.service, null);
         Dictionary<String, String> properties = parser.getDictionary(DescriptorParam.properties, null);
         boolean propagate = "true".equals(parser.getString(DescriptorParam.propagate, "false"));
-        Service srv = dm.createResourceAdapterService(filter, null, serviceClass.getName(), properties, impl, propagate);  
+        Service srv = dm.createResourceAdapterService(filter, null, service, properties, impl, propagate);  
         setCommonServiceParams(srv, parser);
         return srv;
     }