You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by cz...@apache.org on 2015/02/10 09:29:19 UTC
svn commit: r1658632 -
/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/runtime/ServiceComponentRuntimeImpl.java
Author: cziegeler
Date: Tue Feb 10 08:29:18 2015
New Revision: 1658632
URL: http://svn.apache.org/r1658632
Log:
Fix state handling for old ScrService
Modified:
felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/runtime/ServiceComponentRuntimeImpl.java
Modified: felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/runtime/ServiceComponentRuntimeImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/runtime/ServiceComponentRuntimeImpl.java?rev=1658632&r1=1658631&r2=1658632&view=diff
==============================================================================
--- felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/runtime/ServiceComponentRuntimeImpl.java (original)
+++ felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/runtime/ServiceComponentRuntimeImpl.java Tue Feb 10 08:29:18 2015
@@ -474,7 +474,16 @@ public class ServiceComponentRuntimeImpl
public int getState()
{
- return mgr.getState();
+ final int s = mgr.getState();
+ switch ( s )
+ {
+ case ComponentManager.STATE_DISPOSED : return Component.STATE_DISPOSED;
+ case ComponentManager.STATE_DISABLED : return Component.STATE_DISABLED;
+ case ComponentManager.STATE_UNSATISFIED_REFERENCE : return Component.STATE_UNSATISFIED;
+ case ComponentManager.STATE_ACTIVE : return Component.STATE_ACTIVE;
+ default: // satisfied
+ return Component.STATE_ENABLED;
+ }
}
public Bundle getBundle()