felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pde...@apache.org
Subject svn commit: r1781908 [3/5] - in /felix/trunk/dependencymanager: cnf/localrepo/ cnf/releaserepo/ org.apache.felix.dependencymanager.annotation/ org.apache.felix.dependencymanager.annotation/src/org/apache/felix/dm/annotation/api/ org.apache.felix.depend...
Date Mon, 06 Feb 2017 14:37:51 GMT
Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/AdapterAnnotationTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/AdapterAnnotationTest.java?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/AdapterAnnotationTest.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/AdapterAnnotationTest.java Mon Feb  6 14:37:49 2017
@@ -32,6 +32,7 @@ import org.osgi.framework.ServiceRegistr
  * 
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
+@SuppressWarnings("rawtypes")
 public class AdapterAnnotationTest extends TestBase {
     /**
      * Check if an adapter gets injected with its adaptee using default auto config mode.

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/AspectAnnotationTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/AspectAnnotationTest.java?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/AspectAnnotationTest.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/AspectAnnotationTest.java Mon Feb  6 14:37:49 2017
@@ -32,6 +32,7 @@ import org.osgi.framework.ServiceRegistr
  * 
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
+@SuppressWarnings("rawtypes")
 public class AspectAnnotationTest extends TestBase {
  
     public void testAspectChain() throws Throwable {

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/AspectLifecycleAnnotationTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/AspectLifecycleAnnotationTest.java?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/AspectLifecycleAnnotationTest.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/AspectLifecycleAnnotationTest.java Mon Feb  6 14:37:49 2017
@@ -30,9 +30,10 @@ import org.osgi.framework.ServiceRegistr
  * 
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
+@SuppressWarnings("rawtypes")
 public class AspectLifecycleAnnotationTest extends TestBase {
     
-    public void testAnnotatedAspect() {
+	public void testAnnotatedAspect() {
         Ensure e = new Ensure();
         // Provide the Sequencer server to the ServiceProvider service
         ServiceRegistration sr1 = register(e, ServiceProvider.ENSURE);

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/AspectLifecycleWithDynamicProxyAnnotationTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/AspectLifecycleWithDynamicProxyAnnotationTest.java?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/AspectLifecycleWithDynamicProxyAnnotationTest.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/AspectLifecycleWithDynamicProxyAnnotationTest.java Mon Feb  6 14:37:49 2017
@@ -30,6 +30,7 @@ import org.osgi.framework.ServiceRegistr
  * 
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
+@SuppressWarnings("rawtypes")
 public class AspectLifecycleWithDynamicProxyAnnotationTest extends TestBase {    
     public void testAnnotatedAspect() {
         Ensure e = new Ensure();

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/BundleDependencyAnnotationTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/BundleDependencyAnnotationTest.java?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/BundleDependencyAnnotationTest.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/BundleDependencyAnnotationTest.java Mon Feb  6 14:37:49 2017
@@ -29,6 +29,7 @@ import org.osgi.framework.ServiceRegistr
  * 
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
+@SuppressWarnings("rawtypes")
 public class BundleDependencyAnnotationTest extends TestBase {
     
     /**

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/CompositeAnnotationsTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/CompositeAnnotationsTest.java?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/CompositeAnnotationsTest.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/CompositeAnnotationsTest.java Mon Feb  6 14:37:49 2017
@@ -30,6 +30,7 @@ import org.osgi.framework.ServiceRegistr
  * 
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
+@SuppressWarnings("rawtypes")
 public class CompositeAnnotationsTest extends TestBase {
     
     public void testComposite() {

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/ConfigurationProxyTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/ConfigurationProxyTest.java?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/ConfigurationProxyTest.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/ConfigurationProxyTest.java Mon Feb  6 14:37:49 2017
@@ -28,6 +28,7 @@ import org.osgi.framework.ServiceRegistr
  * 
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
+@SuppressWarnings("rawtypes")
 public class ConfigurationProxyTest extends TestBase {
     /**
      * Validates ServiceDependency method signatures.

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/ExtraServicePropertiesTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/ExtraServicePropertiesTest.java?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/ExtraServicePropertiesTest.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/ExtraServicePropertiesTest.java Mon Feb  6 14:37:49 2017
@@ -31,6 +31,7 @@ import org.osgi.framework.ServiceRegistr
  * 
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
+@SuppressWarnings("rawtypes")
 public class ExtraServicePropertiesTest extends TestBase {
     
     /**

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/FELIX5337Test.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/FELIX5337Test.java?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/FELIX5337Test.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/FELIX5337Test.java Mon Feb  6 14:37:49 2017
@@ -27,6 +27,7 @@ import org.osgi.framework.ServiceRegistr
 /**
  * Test test validates that we can lookup ALL existing services using annotation, and "(objectClass=*)" filter.
  */
+@SuppressWarnings("rawtypes")
 public class FELIX5337Test extends TestBase {
     public void testCatchAllServicesUsingAnnotation() {
         Ensure e = new Ensure();

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/Felix4050Test.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/Felix4050Test.java?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/Felix4050Test.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/Felix4050Test.java Mon Feb  6 14:37:49 2017
@@ -30,6 +30,7 @@ import org.osgi.framework.ServiceRegistr
  * 
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
+@SuppressWarnings("rawtypes")
 public class Felix4050Test extends TestBase {
     public void testFelix4050() {
         Ensure e = new Ensure();

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/Felix4357Test.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/Felix4357Test.java?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/Felix4357Test.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/Felix4357Test.java Mon Feb  6 14:37:49 2017
@@ -29,6 +29,7 @@ import org.osgi.framework.ServiceRegistr
  * 
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
+@SuppressWarnings("rawtypes")
 public class Felix4357Test extends TestBase {
     
     public void testSingleProperty() {

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/Felix5236Test.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/Felix5236Test.java?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/Felix5236Test.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/Felix5236Test.java Mon Feb  6 14:37:49 2017
@@ -29,6 +29,7 @@ import org.osgi.framework.ServiceRegistr
  * 
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
+@SuppressWarnings("rawtypes")
 public class Felix5236Test extends TestBase {
     
     public void testPropertiesWithTypes() {

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/InheritedAnnotationsTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/InheritedAnnotationsTest.java?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/InheritedAnnotationsTest.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/InheritedAnnotationsTest.java Mon Feb  6 14:37:49 2017
@@ -28,6 +28,7 @@ import org.osgi.framework.ServiceRegistr
  * 
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
+@SuppressWarnings("rawtypes")
 public class InheritedAnnotationsTest extends TestBase {
     
     public void testInheritedAnnotation() throws Throwable {

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/MethodSignaturesTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/MethodSignaturesTest.java?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/MethodSignaturesTest.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/MethodSignaturesTest.java Mon Feb  6 14:37:49 2017
@@ -28,6 +28,7 @@ import org.osgi.framework.ServiceRegistr
  * 
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
+@SuppressWarnings("rawtypes")
 public class MethodSignaturesTest extends TestBase {
     /**
      * Validates ServiceDependency method signatures.

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/MultipleAnnotationsTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/MultipleAnnotationsTest.java?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/MultipleAnnotationsTest.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/MultipleAnnotationsTest.java Mon Feb  6 14:37:49 2017
@@ -28,6 +28,7 @@ import org.osgi.framework.ServiceRegistr
  * 
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
+@SuppressWarnings("rawtypes")
 public class MultipleAnnotationsTest extends TestBase {
     
     public void testMultipleAnnotations() {

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/OptionalConfigurationTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/OptionalConfigurationTest.java?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/OptionalConfigurationTest.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/OptionalConfigurationTest.java Mon Feb  6 14:37:49 2017
@@ -23,6 +23,7 @@ import org.apache.felix.dm.itest.util.Te
 import org.apache.felix.dm.runtime.itest.components.OptionalConfiguration;
 import org.osgi.framework.ServiceRegistration;
 
+@SuppressWarnings("rawtypes")
 public class OptionalConfigurationTest extends TestBase {
 	
     public void testOptionalConfig() throws Throwable {

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/PropagateAnnotationTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/PropagateAnnotationTest.java?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/PropagateAnnotationTest.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/PropagateAnnotationTest.java Mon Feb  6 14:37:49 2017
@@ -28,6 +28,7 @@ import org.osgi.framework.ServiceRegistr
  * 
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
+@SuppressWarnings("rawtypes")
 public class PropagateAnnotationTest extends TestBase {
     
     public void testServiceDependencyPropagate() {

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/PublisherAnnotationTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/PublisherAnnotationTest.java?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/PublisherAnnotationTest.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/PublisherAnnotationTest.java Mon Feb  6 14:37:49 2017
@@ -32,6 +32,7 @@ import org.osgi.framework.ServiceRegistr
 /**
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
+@SuppressWarnings("rawtypes")
 public class PublisherAnnotationTest extends TestBase {
     
     /**

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/ResourceAnnotationTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/ResourceAnnotationTest.java?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/ResourceAnnotationTest.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/ResourceAnnotationTest.java Mon Feb  6 14:37:49 2017
@@ -28,6 +28,7 @@ import org.osgi.framework.ServiceRegistr
  * 
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
+@SuppressWarnings("rawtypes")
 public class ResourceAnnotationTest extends TestBase {
     
     /**

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/SimpleAnnotationsTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/SimpleAnnotationsTest.java?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/SimpleAnnotationsTest.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/SimpleAnnotationsTest.java Mon Feb  6 14:37:49 2017
@@ -29,6 +29,7 @@ import org.osgi.framework.ServiceRegistr
  * 
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
+@SuppressWarnings("rawtypes")
 public class SimpleAnnotationsTest extends TestBase {
     
     public void testSimpleAnnotations() throws Throwable {

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/bnd.bnd
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/bnd.bnd?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/bnd.bnd (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/bnd.bnd Mon Feb  6 14:37:49 2017
@@ -18,12 +18,10 @@ Bundle-Version: 4.0.4
 -buildpath: \
 	osgi.core;version=4.2,\
 	osgi.cmpn;version=4.2,\
-	org.apache.felix.dependencymanager;version=latest,\
-	de.twentyeleven.skysail.org.json-osgi;version=20080701.0
+	org.apache.felix.dependencymanager;version=latest
 Bundle-Activator:org.apache.felix.dm.runtime.Activator
 Private-Package: \
-	org.apache.felix.dm.runtime,\
-	org.json
+	org.apache.felix.dm.runtime
 Export-Package:  \
 	org.apache.felix.dm.runtime.api
 Provide-Capability: osgi.extender; osgi.extender="org.apache.felix.dependencymanager.runtime";\

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/src/org/apache/felix/dm/runtime/AbstractBuilder.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/src/org/apache/felix/dm/runtime/AbstractBuilder.java?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/src/org/apache/felix/dm/runtime/AbstractBuilder.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/src/org/apache/felix/dm/runtime/AbstractBuilder.java Mon Feb  6 14:37:49 2017
@@ -86,6 +86,13 @@ public abstract class AbstractBuilder
         if (componentField != null)
         {
             c.setAutoConfig(Component.class, componentField);
+        }       
+
+        // See if Service Registration must be auto configured
+        String registrationField = srvMeta.getString(Params.registrationField, null);
+        if (registrationField != null)
+        {
+            c.setAutoConfig(ServiceRegistration.class, registrationField);
         }
 
         // Now, if the component has a @Started annotation, then add our component state listener,

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/src/org/apache/felix/dm/runtime/AspectServiceBuilder.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/src/org/apache/felix/dm/runtime/AspectServiceBuilder.java?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/src/org/apache/felix/dm/runtime/AspectServiceBuilder.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/src/org/apache/felix/dm/runtime/AspectServiceBuilder.java Mon Feb  6 14:37:49 2017
@@ -74,17 +74,8 @@ public class AspectServiceBuilder extend
         } 
         else
         {
-            if (added != null || changed != null || removed != null || swap != null)
-            {
-                c = dm.createAspectService(serviceInterface, serviceFilter, ranking, added, changed, removed, swap)
-                      .setServiceProperties(aspectProperties);
-            } 
-            else
-            {
-                c = dm.createAspectService(serviceInterface, serviceFilter, ranking)
-                      .setServiceProperties(aspectProperties);
-            }
- 
+        	c = dm.createAspectService(serviceInterface, serviceFilter, ranking, null, added, changed, removed, swap)
+        		  .setServiceProperties(aspectProperties); 
         }
         
         setCommonServiceParams(c, srvMeta);

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/src/org/apache/felix/dm/runtime/DependencyBuilder.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/src/org/apache/felix/dm/runtime/DependencyBuilder.java?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/src/org/apache/felix/dm/runtime/DependencyBuilder.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/src/org/apache/felix/dm/runtime/DependencyBuilder.java Mon Feb  6 14:37:49 2017
@@ -104,17 +104,18 @@ public class DependencyBuilder
         String autoConfigField = m_metaData.getString(Params.autoConfig, null);
         boolean required = "true".equals(m_metaData.getString(Params.required, "true"));
         boolean propagate = "true".equals(m_metaData.getString(Params.propagate, "false"));
+        boolean dereference = "true".equals(m_metaData.getString(Params.dereference, "true"));
 
         Dependency dp = createServiceDependency(dm, serviceClass,
             serviceFilter, defaultServiceImplClass, added, changed,
-            removed, autoConfigField, timeout, required, propagate);
+            removed, autoConfigField, timeout, required, propagate, dereference);
         return dp;
     }
 
     private Dependency createServiceDependency(DependencyManager dm, Class<?> serviceClass, 
         String serviceFilter, Class<?> defaultServiceImplClass, String added,
         String changed, String removed, String autoConfigField, long timeout, boolean required,
-        boolean propagate)
+        boolean propagate, boolean dereference)
     {
         ServiceDependency sd = timeout != -1 ? dm.createTemporalServiceDependency(timeout)
             : dm.createServiceDependency();
@@ -134,6 +135,7 @@ public class DependencyBuilder
         }
         
         sd.setPropagate(propagate);
+        sd.setDereference(dereference);
         return sd;
     }
 

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/src/org/apache/felix/dm/runtime/DescriptorParser.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/src/org/apache/felix/dm/runtime/DescriptorParser.java?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/src/org/apache/felix/dm/runtime/DescriptorParser.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/src/org/apache/felix/dm/runtime/DescriptorParser.java Mon Feb  6 14:37:49 2017
@@ -25,7 +25,6 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.felix.dm.DependencyManager;
-import org.json.JSONObject;
 import org.osgi.framework.Bundle;
 
 /**
@@ -51,15 +50,9 @@ public class DescriptorParser
         // The first line is a Service Component (a Service, an Aspect Service, etc ...)
         line = reader.readLine();
         Log.instance().debug("DescriptorParser: parsing service %s", line);
-        JSONObject json = new JSONObject(line);
-        JSONMetaData serviceMetaData = new JSONMetaData(json);
+        JSONMetaData serviceMetaData = new JSONMetaData(line);
 
-        String type = (String) json.get("type");
-        if (type == null)
-        {
-            throw new IllegalArgumentException("Invalid descriptor"
-                    + ": no \"type\" parameter found in first line");
-        }
+        String type = serviceMetaData.getString(Params.type);
 
         AbstractBuilder builder = m_builders.get(type);
         if (builder == null)
@@ -73,8 +66,7 @@ public class DescriptorParser
         while ((line = reader.readLine()) != null)
         {
             Log.instance().debug("Parsing dependency %s", line);
-            JSONObject dep = new JSONObject(line);
-            serviceDependencies.add(new JSONMetaData(dep));
+            serviceDependencies.add(new JSONMetaData(line));
         }
 
         // and Invoke the builder

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/src/org/apache/felix/dm/runtime/FactoryConfigurationAdapterServiceBuilder.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/src/org/apache/felix/dm/runtime/FactoryConfigurationAdapterServiceBuilder.java?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/src/org/apache/felix/dm/runtime/FactoryConfigurationAdapterServiceBuilder.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/src/org/apache/felix/dm/runtime/FactoryConfigurationAdapterServiceBuilder.java Mon Feb  6 14:37:49 2017
@@ -52,17 +52,11 @@ public class FactoryConfigurationAdapter
         Dictionary<String, Object> properties = srvMeta.getDictionary(Params.properties, null);
         boolean propagate = "true".equals(srvMeta.getString(Params.propagate, "false"));
         String configProxyClassName = srvMeta.getString(Params.configType, null);
+
         Component c = null;
         
-        if (configProxyClassName != null)
-        {
-            Class<?> configProxyClass = b.loadClass(configProxyClassName);
-            c = dm.createFactoryConfigurationAdapterService(factoryPid, updated, propagate, configProxyClass);
-        }
-        else
-        {
-            c = dm.createFactoryConfigurationAdapterService(factoryPid, updated, propagate);
-        }
+        Class<?> configProxyClass = configProxyClassName != null ? b.loadClass(configProxyClassName) : null;
+        c = dm.createFactoryConfigurationAdapterService(factoryPid, updated, propagate, null, configProxyClass);
 
         c.setInterface(provides, properties);
         String factoryMethod = srvMeta.getString(Params.factoryMethod, null);

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/src/org/apache/felix/dm/runtime/JSONMetaData.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/src/org/apache/felix/dm/runtime/JSONMetaData.java?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/src/org/apache/felix/dm/runtime/JSONMetaData.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/src/org/apache/felix/dm/runtime/JSONMetaData.java Mon Feb  6 14:37:49 2017
@@ -22,14 +22,11 @@ import java.lang.reflect.Array;
 import java.util.Dictionary;
 import java.util.HashMap;
 import java.util.Hashtable;
-import java.util.Iterator;
-
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
+import java.util.List;
+import java.util.Map;
 
 /**
- * Thsi class represents the parsed data found from meta-inf dependencymanager descriptors.
+ * This class represents the parsed data found from meta-inf dependencymanager descriptors.
  * 
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
@@ -65,65 +62,66 @@ public class JSONMetaData implements Met
      *  }
      * }
      *   
-     * @param jso the JSON object that corresponds to a dependency manager descriptor entry line.
-     * @throws JSONException 
+     * @param input the JSON string that corresponds to a dependency manager descriptor entry line.
+     * @throws Exception 
      */
     @SuppressWarnings("unchecked")
-    public JSONMetaData(JSONObject jso) throws JSONException
+    public JSONMetaData(String input) throws Exception
     {
-        // Decode json object into our internal map.
-        Iterator<String> it = jso.keys();
-        while (it.hasNext())
-        {
-            String key = it.next();
-            Object value = jso.get(key);
-            if (value instanceof String)
-            {
+    	JsonReader jreader = new JsonReader(input);
+        Map<String, Object> m = jreader.getParsed();
+        
+        for (Map.Entry<String, Object> e : m.entrySet())
+        {
+        	String key = e.getKey();
+        	Object value = e.getValue();
+        	if (value instanceof String)
+        	{
                 m_metadata.put(key, value);
-            }
-            else if (value instanceof JSONArray)
-            {
-                m_metadata.put(key, decodeStringArray((JSONArray) value));
-            }
-            else if (value instanceof JSONObject)
-            {
-                m_metadata.put(key, parseProperties((JSONObject) value));
-            }
+        	} else if (value instanceof List)
+        	{
+        		// String array
+                m_metadata.put(key, decodeStringArray((List<?>) value));
+        	} else if (value instanceof Map)
+        	{
+        		// properties
+                m_metadata.put(key, parseProperties((Map<String, Object>) value));
+        	}
         }
     }
 
-    private Hashtable<String, Object> parseProperties(JSONObject properties) throws JSONException {
+    @SuppressWarnings("unchecked")
+	private Hashtable<String, Object> parseProperties(Map<String, Object> properties) throws Exception {
         Hashtable<String, Object> parsedProps = new Hashtable<String, Object>();
-        @SuppressWarnings("unchecked")
-        Iterator<String> it = properties.keys();
-        while (it.hasNext())
-        {
-            String key = it.next();
-            Object value = properties.get(key);
+        
+        for (Map.Entry<String, Object> entry : properties.entrySet()) {
+            String key = entry.getKey();            
+            Object value = entry.getValue();
+            
             if (value instanceof String)
             {
                 // This property type is a simple string
-                parsedProps.put(key, value);
+            	parsedProps.put(key, value);
             }
-            else if (value instanceof JSONArray)
+            else if (value instanceof List)
             {
                 // This property type is a simple string array
-                parsedProps.put(key, decodeStringArray((JSONArray) value));
+                parsedProps.put(key, decodeStringArray((List<?>) value));
             }
-            else if (value instanceof JSONObject)
+            else if (value instanceof Map)
             {
                 // This property type is a typed value, encoded as a JSONObject with two keys: "type"/"value"
-                JSONObject json = ((JSONObject) value);
-                String type = json.getString("type");
+                Map<String, Object> json = ((Map<String, Object>) value);
+                String type = json.get("type").toString();
                 Object typeValue = json.get("value");
 
                 if (type == null)
                 {
-                    throw new JSONException("missing type attribute in json metadata for key " + key);
+                    throw new Exception("missing type attribute in json metadata for key " + key);
                 }
                 if (typeValue == null)
                 {
-                    throw new JSONException("missing type value attribute in json metadata for key " + key);
+                    throw new Exception("missing type value attribute in json metadata for key " + key);
                 }
 
                 Class<?> typeClass;
@@ -133,24 +131,25 @@ public class JSONMetaData implements Met
                 }
                 catch (ClassNotFoundException e)
                 {
-                    throw new JSONException("invalid type attribute (" + type + ") in json metadata for key "
+                    throw new Exception("invalid type attribute (" + type + ") in json metadata for key "
                         + key);
                 }
 
-                if (typeValue instanceof JSONArray)
+                if (typeValue instanceof List)
                 {
-                    parsedProps.put(key, toPrimitiveTypeArray(typeClass, (JSONArray) typeValue));
+                    parsedProps.put(key, toPrimitiveTypeArray(typeClass, (List<?>) typeValue));
                 }
-                else
+                else 
                 {
                     parsedProps.put(key, toPrimitiveType(typeClass, typeValue.toString()));
                 }
             }
         }
+        
         return parsedProps;
     }
 
-    private Object toPrimitiveType(Class<?> type, String value) throws JSONException {
+    private Object toPrimitiveType(Class<?> type, String value) throws Exception {
         if (type.equals(String.class))
         {
             return value;
@@ -189,71 +188,71 @@ public class JSONMetaData implements Met
         }
         else
         {
-            throw new JSONException("invalid type (" + type + ") attribute in json metadata");
+            throw new Exception("invalid type (" + type + ") attribute in json metadata");
         }
     }
 
-    private Object toPrimitiveTypeArray(Class<?> type, JSONArray array) throws JSONException {
-        int len = array.length();
+    private Object toPrimitiveTypeArray(Class<?> type, List<?> array) throws Exception {
+        int len = array.size();
         Object result = Array.newInstance(type, len);
 
         if (type.equals(String.class))
         {
             for (int i = 0; i < len; i ++) {
-                Array.set(result, i, array.getString(i));
+                Array.set(result, i, array.get(i).toString());
             }
         } 
         else if (type.equals(Long.class))
         {
             for (int i = 0; i < len; i ++) {
-                Array.set(result, i, Long.valueOf(array.getString(i)));
+                Array.set(result, i, Long.valueOf(array.get(i).toString()));
             }
         }
         else if (type.equals(Double.class))
         {
             for (int i = 0; i < len; i ++) {
-                Array.set(result, i, Double.valueOf(array.getString(i)));
+                Array.set(result, i, Double.valueOf(array.get(i).toString()));
             }
         } 
         else if (type.equals(Float.class))
         {
             for (int i = 0; i < len; i ++) {
-                Array.set(result, i, Float.valueOf(array.getString(i)));
+                Array.set(result, i, Float.valueOf(array.get(i).toString()));
             }
         }
         else if (type.equals(Integer.class))
         {
             for (int i = 0; i < len; i ++) {
-                Array.set(result, i, Integer.valueOf(array.getString(i)));
+                Array.set(result, i, Integer.valueOf(array.get(i).toString()));
             }
         }
         else if (type.equals(Byte.class))
         {
             for (int i = 0; i < len; i ++) {
-                Array.set(result, i, Byte.valueOf(array.getString(i)));
+                Array.set(result, i, Byte.valueOf(array.get(i).toString()));
             }
         }
         else if (type.equals(Character.class))
         {
             for (int i = 0; i < len; i ++) {
-                Array.set(result, i,  Character.valueOf((char) Integer.parseInt(array.getString(i))));
+                Array.set(result, i,  Character.valueOf((char) Integer.parseInt(array.get(i).toString())));
             }
         }
         else if (type.equals(Boolean.class))
         {
             for (int i = 0; i < len; i ++) {
-                Array.set(result, i, Boolean.valueOf(array.getString(i)));
+                Array.set(result, i, Boolean.valueOf(array.get(i).toString()));
             }
         } 
         else if (type.equals(Short.class))
         {
             for (int i = 0; i < len; i ++) {
-                Array.set(result, i, Short.valueOf(array.getString(i)));
+                Array.set(result, i, Short.valueOf(array.get(i).toString()));
             }
         }
         else 
         {
-            throw new JSONException("invalid type (" + type + ") attribute in json metadata");
+            throw new Exception("invalid type (" + type + ") attribute in json metadata");
         }   
         return result;
     }
@@ -269,7 +268,7 @@ public class JSONMetaData implements Met
         clone.m_metadata = (HashMap<String, Object>) m_metadata.clone();
         return clone;
     }
-
+    
     public String getString(Params key)
     {
         Object value = m_metadata.get(key.toString());
@@ -465,18 +464,8 @@ public class JSONMetaData implements Met
     /**
      * Decodes a JSONArray into a String array (all JSON array values are supposed to be strings).
      */
-    private String[] decodeStringArray(JSONArray array) throws JSONException
+    private String[] decodeStringArray(List<?> array)
     {
-        String[] arr = new String[array.length()];
-        for (int i = 0; i < array.length(); i++)
-        {
-            Object value = array.get(i);
-            if (!(value instanceof String))
-            {
-                throw new IllegalArgumentException("JSON array is not an array of Strings: " + array);
-            }
-            arr[i] = value.toString();
-        }
-        return arr;
+    	return array.stream().map(x -> x.toString()).toArray(String[]::new);
     }
 }

Added: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/src/org/apache/felix/dm/runtime/JsonReader.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/src/org/apache/felix/dm/runtime/JsonReader.java?rev=1781908&view=auto
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/src/org/apache/felix/dm/runtime/JsonReader.java (added)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/src/org/apache/felix/dm/runtime/JsonReader.java Mon Feb  6 14:37:49 2017
@@ -0,0 +1,290 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.felix.dm.runtime;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Stack;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * A very small JSON parser.
+ * Code adapted from the org.apache.felix.serializer.impl.json.JsonParser.java, 
+ * from the Apache Felix Converter proejct.
+ *
+ * The JSON input is parsed into an object structure in the following way:
+ * <ul>
+ * <li>Object names are represented as a {@link String}.
+ * <li>String values are represented as a {@link String}.
+ * <li>Numeric values without a decimal separator are represented as a {@link Long}.
+ * <li>Numeric values with a decimal separator are represented as a {@link Double}.
+ * <li>Boolean values are represented as a {@link Boolean}.
+ * <li>Nested JSON objects are parsed into a {@link java.util.Map Map&lt;String, Object&gt;}.
+ * <li>JSON lists are parsed into a {@link java.util.List} which may contain any of the above values.
+ * </ul>
+ */
+public class JsonReader {
+    private static final Pattern KEY_VALUE_PATTERN = Pattern.compile("^\\s*[\"](.+?)[\"]\\s*[:]\\s*(.+)$");
+
+    private enum Scope { QUOTE, CURLY, BRACKET;
+        static Scope getScope(char c) {
+            switch (c) {
+            case '"':
+                return QUOTE;
+            case '[':
+            case ']':
+                return BRACKET;
+            case '{':
+            case '}':
+                return CURLY;
+            default:
+                return null;
+            }
+        }
+    }
+
+    static class Pair<K, V> {
+        final K key;
+        final V value;
+
+        Pair(K k, V v) {
+            key = k;
+            value = v;
+        }
+    }
+
+    private final Map<String, Object> parsed;
+
+    public JsonReader(CharSequence json) {
+        String str = json.toString();
+        str = str.trim().replace('\n', ' ');
+        parsed = parseObject(str);
+    }
+
+    public JsonReader(InputStream is) throws IOException {
+        this(readStreamAsString(is));
+    }
+
+    public Map<String, Object> getParsed() {
+        return parsed;
+    }
+
+    private static Pair<String, Object> parseKeyValue(String jsonKeyValue) {
+        Matcher matcher = KEY_VALUE_PATTERN.matcher(jsonKeyValue);
+        if (!matcher.matches() || matcher.groupCount() < 2) {
+            throw new IllegalArgumentException("Malformatted JSON key-value pair: " + jsonKeyValue);
+        }
+
+        return new Pair<>(matcher.group(1), parseValue(matcher.group(2)));
+    }
+
+    private static Object parseValue(String jsonValue) {
+        jsonValue = jsonValue.trim();
+
+        switch (jsonValue.charAt(0)) {
+        case '\"':
+            if (!jsonValue.endsWith("\""))
+                throw new IllegalArgumentException("Malformatted JSON string: " + jsonValue);
+
+            return jsonValue.substring(1, jsonValue.length() - 1);
+        case '[':
+            List<Object> entries = new ArrayList<>();
+            for (String v : parseListValuesRaw(jsonValue)) {
+                entries.add(parseValue(v));
+            }
+            return entries;
+        case '{':
+            return parseObject(jsonValue);
+        case 't':
+        case 'T':
+        case 'f':
+        case 'F':
+            return Boolean.parseBoolean(jsonValue);
+        case 'n':
+        case 'N':
+            return null;
+        default:
+            if (jsonValue.contains(".")) {
+                return Double.parseDouble(jsonValue);
+            }
+            return Long.parseLong(jsonValue);
+        }
+    }
+
+    private static Map<String, Object> parseObject(String jsonObject) {
+        if (!(jsonObject.startsWith("{") && jsonObject.endsWith("}")))
+            throw new IllegalArgumentException("Malformatted JSON object: " + jsonObject);
+
+        Map<String, Object> values = new HashMap<>();
+
+        jsonObject = jsonObject.substring(1, jsonObject.length() - 1).trim();
+        if (jsonObject.length() == 0)
+            return values;
+
+        for (String element : parseKeyValueListRaw(jsonObject)) {
+            Pair<String, Object> pair = parseKeyValue(element);
+            values.put(pair.key, pair.value);
+        }
+
+        return values;
+    }
+
+    private static List<String> parseKeyValueListRaw(String jsonKeyValueList) {
+        if (jsonKeyValueList.trim().isEmpty())
+            return Collections.emptyList();
+        jsonKeyValueList = jsonKeyValueList + ","; // append comma to simplify parsing
+        List<String> elements = new ArrayList<>();
+
+        int i=0;
+        int start=0;
+        Stack<Scope> scopeStack = new Stack<>();
+        while (i < jsonKeyValueList.length()) {
+            char curChar = jsonKeyValueList.charAt(i);
+            switch (curChar) {
+            case '"':
+                if (i > 0 && jsonKeyValueList.charAt(i-1) == '\\') {
+                    // it's escaped, ignore for now
+                } else {
+                    if (!scopeStack.empty() && scopeStack.peek() == Scope.QUOTE) {
+                        scopeStack.pop();
+                    } else {
+                        scopeStack.push(Scope.QUOTE);
+                    }
+                }
+                break;
+            case '[':
+            case '{':
+                if ((scopeStack.empty() ? null : scopeStack.peek()) == Scope.QUOTE) {
+                    // inside quotes, ignore
+                } else {
+                    scopeStack.push(Scope.getScope(curChar));
+                }
+                break;
+            case ']':
+            case '}':
+                Scope curScope = scopeStack.empty() ? null : scopeStack.peek();
+                if (curScope == Scope.QUOTE) {
+                    // inside quotes, ignore
+                } else {
+                    Scope newScope = Scope.getScope(curChar);
+                    if (curScope == newScope) {
+                        scopeStack.pop();
+                    } else {
+                        throw new IllegalArgumentException("Unbalanced closing " +
+                            curChar + " in: " + jsonKeyValueList);
+                    }
+                }
+                break;
+            case ',':
+                if (scopeStack.empty()) {
+                    elements.add(jsonKeyValueList.substring(start, i));
+                    start = i+1;
+                }
+                break;
+            }
+
+            i++;
+        }
+        return elements;
+    }
+
+    private static List<String> parseListValuesRaw(String jsonList) {
+        if (!(jsonList.startsWith("[") && jsonList.endsWith("]")))
+            throw new IllegalArgumentException("Malformatted JSON list: " + jsonList);
+
+        jsonList = jsonList.substring(1, jsonList.length() - 1);
+        return parseKeyValueListRaw(jsonList);
+    }
+
+    private static String readStreamAsString(InputStream is) throws IOException {
+        byte [] bytes = readStream(is);
+        if (bytes.length < 5)
+            // need at least 5 bytes to establish the encoding
+            throw new IllegalArgumentException("Malformatted JSON");
+
+        int offset = 0;
+        if ((bytes[0] == -1 && bytes[1] == -2)
+            || (bytes[0] == -2 && bytes[1] == -1)) {
+            // Skip UTF16/UTF32 Byte Order Mark (BOM)
+            offset = 2;
+        }
+
+        /* Infer the encoding as described in section 3 of http://www.ietf.org/rfc/rfc4627.txt
+         * which reads:
+         *   Encoding
+         *
+         *   JSON text SHALL be encoded in Unicode.  The default encoding is
+         *   UTF-8.
+         *
+         *   Since the first two characters of a JSON text will always be ASCII
+         *   characters [RFC0020], it is possible to determine whether an octet
+         *   stream is UTF-8, UTF-16 (BE or LE), or UTF-32 (BE or LE) by looking
+         *   at the pattern of nulls in the first four octets.
+         *
+         *         00 00 00 xx  UTF-32BE
+         *         00 xx 00 xx  UTF-16BE
+         *         xx 00 00 00  UTF-32LE
+         *         xx 00 xx 00  UTF-16LE
+         *         xx xx xx xx  UTF-8
+         */
+        String encoding;
+        if (bytes[offset + 2] == 0) {
+            if (bytes[offset + 1] != 0) {
+                encoding = "UTF-16";
+            } else {
+                encoding = "UTF-32";
+            }
+        } else if (bytes[offset + 1] == 0) {
+            encoding = "UTF-16";
+        } else {
+            encoding = "UTF-8";
+        }
+        return new String(bytes, encoding);
+    }
+    
+    public static byte [] readStream(InputStream is) throws IOException {
+        try {
+            ByteArrayOutputStream baos = new ByteArrayOutputStream();
+            byte[] bytes = new byte[8192];
+
+            int length = 0;
+            int offset = 0;
+
+            while ((length = is.read(bytes, offset, bytes.length - offset)) != -1) {
+                offset += length;
+
+                if (offset == bytes.length) {
+                    baos.write(bytes, 0, bytes.length);
+                    offset = 0;
+                }
+            }
+            if (offset != 0) {
+                baos.write(bytes, 0, offset);
+            }
+            return baos.toByteArray();
+        } finally {
+            is.close();
+        }
+    }
+}
\ No newline at end of file

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/src/org/apache/felix/dm/runtime/Params.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/src/org/apache/felix/dm/runtime/Params.java?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/src/org/apache/felix/dm/runtime/Params.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/src/org/apache/felix/dm/runtime/Params.java Mon Feb  6 14:37:49 2017
@@ -63,7 +63,9 @@ public enum Params
     bundleContextField, 
     dependencyManagerField, 
     componentField,
+    registrationField,
     registered, 
     unregistered,
-    configType
+    configType,
+    dereference
 }

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/bnd.bnd
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/bnd.bnd?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/bnd.bnd (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/bnd.bnd Mon Feb  6 14:37:49 2017
@@ -15,14 +15,14 @@
 # limitations under the License.
 #
 Bundle-Version: 1.0.0.${tstamp}
--buildpath:  \
-	osgi.core;version=4.2,\
-	osgi.cmpn;version=4.2,\
+-buildpath: \
 	biz.aQute.bnd.annotation,\
 	org.apache.felix.dependencymanager;version=latest,\
 	org.apache.felix.gogo.runtime;version=latest,\
 	org.apache.felix.dependencymanager.runtime;version=latest,\
-	org.apache.felix.dependencymanager.annotation;version=latest
+	org.apache.felix.dependencymanager.annotation;version=latest,\
+	osgi.core;version=6.0,\
+	osgi.cmpn;version=6.0
 -sub:  \
 	*.bnd
 -metatype: *

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/annot/DictionaryAspectConfiguration.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/annot/DictionaryAspectConfiguration.java?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/annot/DictionaryAspectConfiguration.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/annot/DictionaryAspectConfiguration.java Mon Feb  6 14:37:49 2017
@@ -20,8 +20,8 @@ package org.apache.felix.dependencymanag
 
 import java.util.List;
 
-import aQute.bnd.annotation.metatype.Meta.AD;
-import aQute.bnd.annotation.metatype.Meta.OCD;
+import org.osgi.service.metatype.annotations.AttributeDefinition;
+import org.osgi.service.metatype.annotations.ObjectClassDefinition;
 
 /**
  * This interface describes the configuration for our DictionaryAspect component. We are using the bnd metatype
@@ -29,9 +29,11 @@ import aQute.bnd.annotation.metatype.Met
  * 
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
-@OCD(name="Spell Checker Aspect Dictionary",
-     description = "Declare here the list of english words to be added into the default english dictionary")
+@ObjectClassDefinition(
+	name="Spell Checker Aspect Dictionary",
+    description = "Declare here the list of english words to be added into the default english dictionary",
+    pid="org.apache.felix.dependencymanager.samples.dictionary.annot.DictionaryAspectConfiguration")
 public interface DictionaryAspectConfiguration {
-    @AD(description = "Dictionary aspect words")
+    @AttributeDefinition(description = "Dictionary aspect words")
     List<String> words();
 }

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/annot/DictionaryConfiguration.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/annot/DictionaryConfiguration.java?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/annot/DictionaryConfiguration.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/annot/DictionaryConfiguration.java Mon Feb  6 14:37:49 2017
@@ -20,8 +20,8 @@ package org.apache.felix.dependencymanag
 
 import java.util.List;
 
-import aQute.bnd.annotation.metatype.Meta.AD;
-import aQute.bnd.annotation.metatype.Meta.OCD;
+import org.osgi.service.metatype.annotations.AttributeDefinition;
+import org.osgi.service.metatype.annotations.ObjectClassDefinition;
 
 /**
  * This interface describes the configuration for our DictionaryImpl component. We are using the bnd metatype
@@ -29,13 +29,14 @@ import aQute.bnd.annotation.metatype.Met
  * 
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
-@OCD(name="Spell Checker Dictionary", 
-     factory = true, 
-     description = "Declare here some Dictionary instances, allowing to instantiates some DictionaryService services for a given dictionary language")
+@ObjectClassDefinition(
+	name="Spell Checker Dictionary", 
+	factoryPid = "org.apache.felix.dependencymanager.samples.dictionary.annot.DictionaryConfiguration", 
+	description = "Declare here some Dictionary instances, allowing to instantiates some DictionaryService services for a given dictionary language")
 public interface DictionaryConfiguration {
-    @AD(description = "Describes the dictionary language", deflt = "en")
+    @AttributeDefinition(description = "Describes the dictionary language", defaultValue = "en")
     String lang();
 
-    @AD(description = "Declare here the list of words supported by this dictionary. This properties starts with a Dot and won't be propagated with Dictionary OSGi service properties")
+    @AttributeDefinition(description = "Declare here the list of words supported by this dictionary. This properties starts with a Dot and won't be propagated with Dictionary OSGi service properties")
     List<String> words();
 }

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/api/DictionaryAspectConfiguration.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/api/DictionaryAspectConfiguration.java?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/api/DictionaryAspectConfiguration.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/api/DictionaryAspectConfiguration.java Mon Feb  6 14:37:49 2017
@@ -20,8 +20,8 @@ package org.apache.felix.dependencymanag
 
 import java.util.List;
 
-import aQute.bnd.annotation.metatype.Meta.AD;
-import aQute.bnd.annotation.metatype.Meta.OCD;
+import org.osgi.service.metatype.annotations.AttributeDefinition;
+import org.osgi.service.metatype.annotations.ObjectClassDefinition;
 
 /**
  * This interface describes the configuration for our DictionaryAspect component. We are using the bnd metatype
@@ -29,9 +29,11 @@ import aQute.bnd.annotation.metatype.Met
  * 
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
-@OCD(name="Spell Checker Aspect Dictionary",
-     description = "Declare here the list of english words to be added into the default english dictionary")
+@ObjectClassDefinition(
+	name="Spell Checker Aspect Dictionary",
+    description = "Declare here the list of english words to be added into the default english dictionary",
+    pid="org.apache.felix.dependencymanager.samples.dictionary.api.DictionaryAspectConfiguration")
 public interface DictionaryAspectConfiguration {
-    @AD(description = "Dictionary aspect words")
+    @AttributeDefinition(description = "Dictionary aspect words")
     List<String> words();
 }

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/api/DictionaryConfiguration.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/api/DictionaryConfiguration.java?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/api/DictionaryConfiguration.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/api/DictionaryConfiguration.java Mon Feb  6 14:37:49 2017
@@ -20,8 +20,8 @@ package org.apache.felix.dependencymanag
 
 import java.util.List;
 
-import aQute.bnd.annotation.metatype.Meta.AD;
-import aQute.bnd.annotation.metatype.Meta.OCD;
+import org.osgi.service.metatype.annotations.AttributeDefinition;
+import org.osgi.service.metatype.annotations.ObjectClassDefinition;
 
 /**
  * This interface describes the configuration for our DictionaryImpl component. We are using the bnd metatype
@@ -29,13 +29,13 @@ import aQute.bnd.annotation.metatype.Met
  * 
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
-@OCD(name="Spell Checker Dictionary",
-     factory = true, 
+@ObjectClassDefinition(name="Spell Checker Dictionary",
+     factoryPid = "org.apache.felix.dependencymanager.samples.dictionary.api.DictionaryConfiguration", 
      description = "Declare here some Dictionary instances, allowing to instantiates some DictionaryService services for a given dictionary language")
 public interface DictionaryConfiguration {
-    @AD(description = "Describes the dictionary language", deflt = "en")
+    @AttributeDefinition(description = "Describes the dictionary language", defaultValue = "en")
     String lang();
 
-    @AD(description = "Declare here the list of words supported by this dictionary.")
+    @AttributeDefinition(description = "Declare here the list of words supported by this dictionary.")
     List<String> words();
 }

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dynamicdep/annot/DynamicDependencyConfiguration.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dynamicdep/annot/DynamicDependencyConfiguration.java?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dynamicdep/annot/DynamicDependencyConfiguration.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dynamicdep/annot/DynamicDependencyConfiguration.java Mon Feb  6 14:37:49 2017
@@ -18,26 +18,32 @@
  */
 package org.apache.felix.dependencymanager.samples.dynamicdep.annot;
 
-import aQute.bnd.annotation.metatype.Meta.AD;
-import aQute.bnd.annotation.metatype.Meta.OCD;
+import org.osgi.service.metatype.annotations.AttributeDefinition;
+import org.osgi.service.metatype.annotations.*;
 
 /**
- * This interface describes the configuration for our DynamicDependencyComponent component. We are using the bnd metatype
+ * This interface describes the configuration for our DynamicDependencyComponent component. We are using the metatype
  * annotations, allowing to configure our component  from web console.
  * 
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
-@OCD(name = "Dynamic Dependency Configuration",
-     description = "Declare here the configuration for the DynamicDependency component.")
+@ObjectClassDefinition(
+		name = "Dynamic Dependency Configuration",
+		description = "Declare here the configuration for the DynamicDependency component.",
+		pid="org.apache.felix.dependencymanager.samples.dynamicdep.annot.DynamicDependencyConfiguration")
 public interface DynamicDependencyConfiguration {
     
-    @AD(description = "Enter the storage type to use", 
-        deflt = "mapdb", 
-        optionLabels = { "Map DB Storage implementation", "File Storage implementation" },
-        optionValues = { "mapdb", "file" })
+    @AttributeDefinition(description = "Enter the storage type to use", 
+        defaultValue = "mapdb",
+        options={
+        	@Option(label="Map DB Storage implementation", value="mapdb"),
+        	@Option(label="File Storage implementation", value="file")
+        })
     String storageType();
 
-    @AD(description = "Specifies here is the storage dependency is required or not (if false, a null object will be used)", deflt = "true")
+    @AttributeDefinition(
+    	description = "Specifies here is the storage dependency is required or not (if false, a null object will be used)", 
+    	defaultValue = "true")
     boolean storageRequired();
 
 }

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dynamicdep/api/DynamicDependencyConfiguration.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dynamicdep/api/DynamicDependencyConfiguration.java?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dynamicdep/api/DynamicDependencyConfiguration.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dynamicdep/api/DynamicDependencyConfiguration.java Mon Feb  6 14:37:49 2017
@@ -18,24 +18,33 @@
  */
 package org.apache.felix.dependencymanager.samples.dynamicdep.api;
 
-import aQute.bnd.annotation.metatype.Meta.AD;
-import aQute.bnd.annotation.metatype.Meta.OCD;
+import org.osgi.service.metatype.annotations.AttributeDefinition;
+import org.osgi.service.metatype.annotations.ObjectClassDefinition;
+import org.osgi.service.metatype.annotations.Option;
 
 /**
- * This interface describes the configuration for our DynamicDependencyComponent component. We are using the bnd metatype
+ * This interface describes the configuration for our DynamicDependencyComponent component. We are using the metatype
  * annotations, allowing to configure our component  from web console.
  * 
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
-@OCD(name = "Dynamic Dependency Configuration", 
-     description = "Declare here the configuration for the DynamicDependency component.")
+@ObjectClassDefinition(
+		name = "Dynamic Dependency Configuration",
+		description = "Declare here the configuration for the DynamicDependency component.",
+		pid="org.apache.felix.dependencymanager.samples.dynamicdep.api.DynamicDependencyConfiguration")
 public interface DynamicDependencyConfiguration {
-    @AD(description = "Enter the storage type to use", 
-    		deflt = "mapdb", 
-    		optionLabels= {"Map DB Storage implementation", "File Storage implementation"},
-    		optionValues={"mapdb", "file"})
+    
+    @AttributeDefinition(description = "Enter the storage type to use", 
+        defaultValue = "mapdb",
+        options={
+        	@Option(label="Map DB Storage implementation", value="mapdb"),
+        	@Option(label="File Storage implementation", value="file")
+        })
     String storageType();
 
-    @AD(description = "Specifies here is the storage dependency is required or not (if false, a null object will be used)", deflt = "true")
+    @AttributeDefinition(
+    	description = "Specifies here is the storage dependency is required or not (if false, a null object will be used)", 
+    	defaultValue = "true")
     boolean storageRequired();
+
 }

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.shell/bnd.bnd
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.shell/bnd.bnd?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.shell/bnd.bnd (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.shell/bnd.bnd Mon Feb  6 14:37:49 2017
@@ -14,13 +14,13 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
--buildpath:  \
-	osgi.core;version=4.2,\
-	osgi.cmpn;version=4.2,\
+-buildpath: \
 	org.apache.felix.gogo.runtime;version=0.10,\
 	org.mockito.mockito-all;version=1.9,\
 	org.apache.felix.dependencymanager;version=latest,\
-	${junit}
+	${junit},\
+	osgi.core;version=6.0,\
+	osgi.cmpn;version=6.0
 Private-Package: \
 	org.apache.felix.dm.shell
 Bundle-Activator:org.apache.felix.dm.shell.Activator

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.shell/test/test/DMCommandTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.shell/test/test/DMCommandTest.java?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.shell/test/test/DMCommandTest.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.shell/test/test/DMCommandTest.java Mon Feb  6 14:37:49 2017
@@ -29,7 +29,7 @@ import java.io.ByteArrayOutputStream;
 import java.io.FileDescriptor;
 import java.io.FileOutputStream;
 import java.io.PrintStream;
-import java.util.Properties;
+import java.util.Hashtable;
 
 import javax.crypto.Cipher;
 
@@ -259,7 +259,7 @@ public class DMCommandTest {
         Bundle bundle1 = mock(Bundle.class);
         when(bundle1.getState()).thenReturn(Bundle.RESOLVED);
         when(bundle1.getSymbolicName()).thenReturn("BadBundle");
-        Properties headers = new Properties();
+        Hashtable<String, String> headers = new Hashtable<>();
         when(bundle1.getHeaders()).thenReturn(headers);
         
         setupBundles(bundle1);
@@ -277,7 +277,7 @@ public class DMCommandTest {
         Bundle bundle1 = mock(Bundle.class);
         when(bundle1.getState()).thenReturn(Bundle.RESOLVED);
         when(bundle1.getSymbolicName()).thenReturn("BadBundle");
-        Properties headers = new Properties();
+        Hashtable<String, String> headers = new Hashtable<>();
         headers.put("Fragment-Host", "some value");
         when(bundle1.getHeaders()).thenReturn(headers);
         setupBundles(bundle1);

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager/bnd.bnd
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager/bnd.bnd?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager/bnd.bnd (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager/bnd.bnd Mon Feb  6 14:37:49 2017
@@ -15,11 +15,12 @@
 # limitations under the License.
 #
 -buildpath: \
-	osgi.core;version=4.2,\
-	osgi.cmpn;version=4.2,\
 	org.mockito.mockito-all;version=1.9,\
 	${junit},\
-	biz.aQute.bndlib;version=3.0
+	biz.aQute.bndlib;version=3.0,\
+	osgi.core;version=6.0,\
+	osgi.cmpn;version=6.0,\
+	osgi.annotation;version=6.0
 Private-Package: \
 	org.apache.felix.dm.impl,\
 	org.apache.felix.dm.impl.index,\

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/Component.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/Component.java?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/Component.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/Component.java Mon Feb  6 14:37:49 2017
@@ -150,6 +150,7 @@ public interface Component {
      * 
      * @return the service registration
      */
+	@SuppressWarnings("rawtypes")
 	public ServiceRegistration getServiceRegistration();
 
     /**

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/ComponentState.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/ComponentState.java?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/ComponentState.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/ComponentState.java Mon Feb  6 14:37:49 2017
@@ -49,6 +49,12 @@ public enum ComponentState {
     STARTING,
         
 	/**
+	 * The component has been called in its started callback. At this point, the component has not yet been registered
+	 * in the service registry.
+	 */
+	STARTED,
+
+	/**
 	 * The component is started. At this point, the component:<p>
 	 * <ul>
 	 * <li> has been called in its start callback 

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/ConfigurationDependency.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/ConfigurationDependency.java?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/ConfigurationDependency.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/ConfigurationDependency.java Mon Feb  6 14:37:49 2017
@@ -22,7 +22,7 @@ import java.util.Collection;
 import java.util.Dictionary;
 import java.util.Map;
 
-import aQute.bnd.annotation.ProviderType;
+import org.osgi.annotation.versioning.ProviderType;
 
 /**
  * Configuration dependency that can track the availability of a (valid) configuration. To use

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/FilterIndex.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/FilterIndex.java?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/FilterIndex.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/FilterIndex.java Mon Feb  6 14:37:49 2017
@@ -38,7 +38,8 @@ public interface FilterIndex {
     /** Determines if the combination of class and filter is applicable for this filter index. */
     public boolean isApplicable(String clazz, String filter);
     /** Returns all service references that match the specified class and filter. Never returns null. */
-    public List<ServiceReference> getAllServiceReferences(String clazz, String filter);
+    @SuppressWarnings("rawtypes")
+	public List<ServiceReference> getAllServiceReferences(String clazz, String filter);
     /** Invoked whenever a service event occurs. */
     public void serviceChanged(ServiceEvent event);
     /** Adds a service listener to this filter index. */

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/Logger.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/Logger.java?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/Logger.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/Logger.java Mon Feb  6 14:37:49 2017
@@ -47,6 +47,7 @@ import org.osgi.service.log.LogService;
  *
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
+@SuppressWarnings({"rawtypes", "unchecked"})
 public class Logger implements ServiceListener {
 	private static final String LOG_SINGLE_CONTEXT = "org.apache.felix.dependencymanager.singleContextLog";
     public static final int LOG_ERROR = 1;
@@ -59,7 +60,7 @@ public class Logger implements ServiceLi
     private final static int LOGGER_OBJECT_IDX = 0;
     private final static int LOGGER_METHOD_IDX = 1;
     private static final String ENABLED_LOG_LEVEL = "org.apache.felix.dependencymanager.loglevel";
-    private ServiceReference m_logRef = null;
+	private ServiceReference m_logRef = null;
     private Object[] m_logger = null;
     private int m_enabledLevel = LogService.LOG_WARNING;
     private String m_debugKey;
@@ -172,7 +173,7 @@ public class Logger implements ServiceLi
      * there will never be a log service present since the system bundle is
      * started before every other bundle.
      */
-    private synchronized void startListeningForLogService() {
+	private synchronized void startListeningForLogService() {
         try {
             // add a service listener for log services, carefully avoiding any code dependency on it
             m_context.addServiceListener(this, "(objectClass=org.osgi.service.log.LogService)");

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/ServiceDependency.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/ServiceDependency.java?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/ServiceDependency.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/ServiceDependency.java Mon Feb  6 14:37:49 2017
@@ -18,6 +18,7 @@
  */
 package org.apache.felix.dm;
 
+import org.osgi.annotation.versioning.ProviderType;
 import org.osgi.framework.ServiceReference;
 
 /**
@@ -25,6 +26,7 @@ import org.osgi.framework.ServiceReferen
  * 
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
+@ProviderType
 public interface ServiceDependency extends Dependency, ComponentDependencyDeclaration {
     /**
      * Sets the callbacks for this service. These callbacks can be used as hooks whenever a
@@ -244,7 +246,8 @@ public interface ServiceDependency exten
      * @param serviceReference the service reference to track
      * @return this service dependency
      */
-    public ServiceDependency setService(Class<?> serviceName, ServiceReference serviceReference);
+    @SuppressWarnings("rawtypes")
+	public ServiceDependency setService(Class<?> serviceName, ServiceReference serviceReference);
     
     /**
      * Sets the default implementation for this service dependency. You can use this to supply
@@ -261,6 +264,8 @@ public interface ServiceDependency exten
     /**
      * Sets propagation of the service dependency properties to the provided service properties. Any additional
      * service properties specified directly are merged with these.
+     * 
+     * @param propagate true if the dependency service properties should be propagated to the component service properties.
      */
     public ServiceDependency setPropagate(boolean propagate);
     
@@ -282,4 +287,15 @@ public interface ServiceDependency exten
      * @return this service dependency.
      */
     public ServiceDependency setDebug(String debugKey);
+    
+    /**
+     * Configures whether or not this dependency should internally obtain the service object for all tracked service references.
+     * 
+     * By default, DM internally dereferences all discovered service references (using 
+     * <code>BundleContext.getService(ServiceReference ref)</code> methods. 
+     * However, sometimes, your callback only needs the ServiceReference, and sometimes you don't want to dereference the service.
+     * So, in this case you can use the <code>setDereference(false)</code> method in order to tell to DM 
+     * that it should never internally dereference the service dependency internally. 
+     */
+    public ServiceDependency setDereference(boolean dereferenceServiceInternally);
 }

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/context/ComponentContext.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/context/ComponentContext.java?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/context/ComponentContext.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/context/ComponentContext.java Mon Feb  6 14:37:49 2017
@@ -22,14 +22,14 @@ import java.util.Dictionary;
 import java.util.List;
 import java.util.Set;
 import java.util.concurrent.Executor;
+import java.util.function.Supplier;
 
 import org.apache.felix.dm.Component;
 import org.apache.felix.dm.Logger;
+import org.osgi.annotation.versioning.ProviderType;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 
-import aQute.bnd.annotation.ProviderType;
-
 /**
  * This interface is the entry point to the Component implementation context.
  * It is used by all DependencyManager Dependency implementations.
@@ -134,6 +134,16 @@ public interface ComponentContext extend
     public void invokeCallbackMethod(Object[] instances, String methodName, Class<?>[][] signatures, Object[][] parameters, boolean logIfNotFound);
     
     /**
+     * Invokes a callback method on a given set of objects. An error is logged if the callback is not found in any of the object instances.
+     * @param instances the component instances
+     * @param methodName the method name
+     * @param signatures the method signatures (types)
+     * @param paramsSupplier the supplier for the method parameters
+     * @param logIfNotFound true if a warning message should be logged in case the callback is not found in any of the object instances.
+     */
+    public void invokeCallback(Object[] instances, String methodName, Class<?>[][] signatures, Supplier<?>[][] paramsSupplier, boolean logIfNotFound);
+
+    /**
      * Returns the component instances
      * @return the component instances
      */
@@ -178,4 +188,10 @@ public interface ComponentContext extend
      * @return an instance of the given type that wraps the given configuration.
      */
     public <T> T createConfigurationType(Class<T> type, Dictionary<?, ?> config);
+                
+    /**
+     * Instantiates the component instances.
+     * @return this component context.
+     */   
+    public ComponentContext instantiateComponent();
 }

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/context/packageinfo
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/context/packageinfo?rev=1781908&r1=1781907&r2=1781908&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/context/packageinfo (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/context/packageinfo Mon Feb  6 14:37:49 2017
@@ -1 +1 @@
-version 4.2.0
+version 4.3.0



Mime
View raw message