diff options
Diffstat (limited to 'appc-event-listener/appc-event-listener-bundle/src/main/java/org/onap/appc/listener/AppcEventListenerActivator.java')
-rw-r--r-- | appc-event-listener/appc-event-listener-bundle/src/main/java/org/onap/appc/listener/AppcEventListenerActivator.java | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/appc-event-listener/appc-event-listener-bundle/src/main/java/org/onap/appc/listener/AppcEventListenerActivator.java b/appc-event-listener/appc-event-listener-bundle/src/main/java/org/onap/appc/listener/AppcEventListenerActivator.java index 0b1eb5328..a65b315e4 100644 --- a/appc-event-listener/appc-event-listener-bundle/src/main/java/org/onap/appc/listener/AppcEventListenerActivator.java +++ b/appc-event-listener/appc-event-listener-bundle/src/main/java/org/onap/appc/listener/AppcEventListenerActivator.java @@ -80,11 +80,6 @@ public class AppcEventListenerActivator implements BundleActivator { private Configuration configuration; /** - * The bundle context - */ - private static BundleContext context; - - /** * The reference to the actual implementation object that implements the services */ private Controller adapter; @@ -113,8 +108,6 @@ public class AppcEventListenerActivator implements BundleActivator { public void start(BundleContext ctx) throws Exception { LOG.info("Starting Bundle " + getName()); - context = ctx; - configuration = ConfigurationFactory.getConfiguration(); Properties props = configuration.getProperties(); @@ -126,8 +119,6 @@ public class AppcEventListenerActivator implements BundleActivator { demoProps.setListenerClass(org.onap.appc.listener.demo.impl.ListenerImpl.class); listeners.add(demoProps); - // =========================================================================== - ListenerProperties clLCMProps = new ListenerProperties("appc.LCM", props); clLCMProps.setListenerClass(org.onap.appc.listener.LCM.impl.ListenerImpl.class); listeners.add(clLCMProps); @@ -194,8 +185,14 @@ public class AppcEventListenerActivator implements BundleActivator { private boolean isAppcOamPropsListenerEnabled(ListenerProperties listenerProperties) { final Properties appcOamProperties = listenerProperties.getProperties(); - return appcOamProperties == null - || !Boolean.parseBoolean(appcOamProperties.getProperty( - ListenerProperties.KEYS.DISABLED.getPropertySuffix())); + boolean result; + if (appcOamProperties == null) { + result = true; + } else { + result = !Boolean.parseBoolean(appcOamProperties.getProperty( + ListenerProperties.KEYS.DISABLED.getPropertySuffix())); + } + + return result; } } |