FElIX-3710 don't try to activate on an optional service event

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1397884 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/scr/src/main/java/org/apache/felix/scr/impl/manager/DependencyManager.java b/scr/src/main/java/org/apache/felix/scr/impl/manager/DependencyManager.java
index 6928fe4..f1343c6 100644
--- a/scr/src/main/java/org/apache/felix/scr/impl/manager/DependencyManager.java
+++ b/scr/src/main/java/org/apache/felix/scr/impl/manager/DependencyManager.java
@@ -328,7 +328,7 @@
         // if the component is currently unsatisfied, it may become satisfied
         // by adding this service, try to activate (also schedule activation
         // if the component is pending deactivation)
-        if ( m_componentManager.getState() == AbstractComponentManager.STATE_UNSATISFIED )
+        if ( m_componentManager.getState() == AbstractComponentManager.STATE_UNSATISFIED && !isOptional() )
         {
             m_componentManager.log( LogService.LOG_DEBUG,
                 "Dependency Manager: Service {0} registered, activate component", new Object[]