commit | bad740c4abfa69fdbab6fff69438e18e7410ee8b | [log] [tgz] |
---|---|---|
author | Carsten Ziegeler <cziegeler@apache.org> | Tue Feb 10 08:29:18 2015 +0000 |
committer | Carsten Ziegeler <cziegeler@apache.org> | Tue Feb 10 08:29:18 2015 +0000 |
tree | 6951dbaa049e4ebbf62d87cd4ba3b15e0b4dad5b | |
parent | 4b6707119564bcddaf1e201866693de4d7e023bd [diff] |
Fix state handling for old ScrService git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1658632 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/scr/src/main/java/org/apache/felix/scr/impl/runtime/ServiceComponentRuntimeImpl.java b/scr/src/main/java/org/apache/felix/scr/impl/runtime/ServiceComponentRuntimeImpl.java index 9fe2b78..977f45c 100644 --- a/scr/src/main/java/org/apache/felix/scr/impl/runtime/ServiceComponentRuntimeImpl.java +++ b/scr/src/main/java/org/apache/felix/scr/impl/runtime/ServiceComponentRuntimeImpl.java
@@ -474,7 +474,16 @@ 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()