FELIX-2246 Do not check for label property twice upon service events
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@931719 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/PluginHolder.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/PluginHolder.java
index 5cc921d..8cdc5a0 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/PluginHolder.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/PluginHolder.java
@@ -301,25 +301,21 @@
*/
public void serviceChanged( ServiceEvent event )
{
- final String label = getProperty( event.getServiceReference(), WebConsoleConstants.PLUGIN_LABEL );
- if ( label != null )
+ switch ( event.getType() )
{
- switch ( event.getType() )
- {
- case ServiceEvent.REGISTERED:
- // add service
- serviceAdded( event.getServiceReference() );
- break;
+ case ServiceEvent.REGISTERED:
+ // add service
+ serviceAdded( event.getServiceReference() );
+ break;
- case ServiceEvent.UNREGISTERING:
- // remove service
- serviceRemoved( event.getServiceReference() );
- break;
+ case ServiceEvent.UNREGISTERING:
+ // remove service
+ serviceRemoved( event.getServiceReference() );
+ break;
- default:
- // update service
- break;
- }
+ default:
+ // update service
+ break;
}
}