FELIX-4296 : Cannot deactivate service interface detection in DS annotations

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1613113 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/scrplugin/ds-annotations/pom.xml b/scrplugin/ds-annotations/pom.xml
index 4e354cc..26bd591 100644
--- a/scrplugin/ds-annotations/pom.xml
+++ b/scrplugin/ds-annotations/pom.xml
@@ -48,7 +48,7 @@
         <dependency>
             <groupId>org.apache.felix</groupId>
             <artifactId>org.apache.felix.scr.generator</artifactId>
-            <version>1.8.0</version>
+            <version>1.10.1-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
diff --git a/scrplugin/ds-annotations/src/main/java/org/apache/felix/scrplugin/ds/DSAnnotationProcessor.java b/scrplugin/ds-annotations/src/main/java/org/apache/felix/scrplugin/ds/DSAnnotationProcessor.java
index f044df6..bbb02d9 100644
--- a/scrplugin/ds-annotations/src/main/java/org/apache/felix/scrplugin/ds/DSAnnotationProcessor.java
+++ b/scrplugin/ds-annotations/src/main/java/org/apache/felix/scrplugin/ds/DSAnnotationProcessor.java
@@ -133,10 +133,12 @@
 
         // services
         final List<String> listedInterfaces = new ArrayList<String>();
-        if (cad.getValue("service") != null) {
+        if (cad.hasValue("service") ) {
             final String[] interfaces = (String[]) cad.getValue("service");
-            for (final String t : interfaces) {
-                listedInterfaces.add(t);
+            if ( interfaces != null ) {
+                for (final String t : interfaces) {
+                    listedInterfaces.add(t);
+                }
             }
         } else {
             // scan directly implemented interfaces
diff --git a/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/annotations/ScannedAnnotation.java b/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/annotations/ScannedAnnotation.java
index 20acde1..afca2de 100644
--- a/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/annotations/ScannedAnnotation.java
+++ b/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/annotations/ScannedAnnotation.java
@@ -58,6 +58,20 @@
     }
 
     /**
+     * Check if a value exists for this annotation.
+     * This method can be used to check whether a value exists,
+     * even if the value is <code>null</code>.
+     * @param paramName The property name
+     * @return <code>true</code> If a value exists.
+     */
+    public boolean hasValue(final String paramName) {
+        if ( values != null ) {
+            return values.containsKey(paramName);
+        }
+        return false;
+    }
+
+    /**
      * Get a property value of the annotation.
      * @param paramName The property name.
      * @return The value of the property or <code>null</code>