felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clem...@apache.org
Subject svn commit: r1157032 - /felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/providedservice/ProvidedService.java
Date Fri, 12 Aug 2011 10:16:31 GMT
Author: clement
Date: Fri Aug 12 10:16:30 2011
New Revision: 1157032

URL: http://svn.apache.org/viewvc?rev=1157032&view=rev
Log:
Applied patch for FELIX-3075

Modified:
    felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/providedservice/ProvidedService.java

Modified: felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/providedservice/ProvidedService.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/providedservice/ProvidedService.java?rev=1157032&r1=1157031&r2=1157032&view=diff
==============================================================================
--- felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/providedservice/ProvidedService.java
(original)
+++ felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/providedservice/ProvidedService.java
Fri Aug 12 10:16:30 2011
@@ -732,21 +732,13 @@ public class ProvidedService implements 
         public void setValue(Boolean value) {
             synchronized (ProvidedService.this) {
                 if (value.booleanValue() != m_value) {
+                    // If there is a change to the ServiceController value then
+                    // we will
+                    // need to modify the registrations.
                     m_value = value.booleanValue();
-                    if (m_value) {
-                        if (m_serviceRegistration == null) {
-                            registerService();
-                        }
-                        // Already registered.
-                    } else {
-                        // If we are still some specification valid, register those one
-                        if (getServiceSpecificationsToRegister().length != 0) {
-                            unregisterService();
-                            registerService();
-                        } else {
-                            // If not, then unregister all
-                            unregisterService();
-                        }
+                    unregisterService();
+                    if (getServiceSpecificationsToRegister().length != 0) {
+                        registerService();
                     }
                 }
             }



Mime
View raw message