FELIX-356 DependencyManager.bind may bind to null and does not correctly check for success
   ( we also have to check whether the reference is multiple or not )

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@573179 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/scr/src/main/java/org/apache/felix/scr/DependencyManager.java b/scr/src/main/java/org/apache/felix/scr/DependencyManager.java
index 9dbb4c2..b8a0085 100644
--- a/scr/src/main/java/org/apache/felix/scr/DependencyManager.java
+++ b/scr/src/main/java/org/apache/felix/scr/DependencyManager.java
@@ -307,6 +307,12 @@
 
             // we have at least on service bound
             success = true;
+            
+            // if the reference is not multiple, we are already done
+            if ( !m_dependencyMetadata.isMultiple() )
+            {
+                break;
+            }
         }
 
         // success will be true, if the service is optional or if at least