aboutsummaryrefslogtreecommitdiffstats
path: root/appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle
diff options
context:
space:
mode:
authorkusuma kumari M <km583p@att.com>2018-01-03 21:55:50 -0500
committerSkip Wonnell <skip@att.com>2018-01-09 15:18:42 +0000
commit2a66c7c042d4d5919f8b200d026f211ba241774f (patch)
tree2f7c0c20f3b113cb91d2f75fb94e7ccd4c79fc31 /appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle
parent31540f8ba964a7d66ca04f1468db061abda5c7a1 (diff)
code changes for platform hardening appc adapters
Issue-ID: APPC-305 Change-Id: Ice60ca77ffccc409d50ef11318e841c3b1f82ce1 Signed-off-by: kusuma kumari M <km583p@att.com>
Diffstat (limited to 'appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle')
-rw-r--r--appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/src/main/java/org/onap/appc/adapter/netconf/AppcNetconfAdapterActivator.java21
-rw-r--r--appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/src/main/java/org/onap/appc/adapter/netconf/internal/NetconfDataAccessServiceImpl.java2
2 files changed, 7 insertions, 16 deletions
diff --git a/appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/src/main/java/org/onap/appc/adapter/netconf/AppcNetconfAdapterActivator.java b/appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/src/main/java/org/onap/appc/adapter/netconf/AppcNetconfAdapterActivator.java
index bae220d13..70438d7da 100644
--- a/appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/src/main/java/org/onap/appc/adapter/netconf/AppcNetconfAdapterActivator.java
+++ b/appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/src/main/java/org/onap/appc/adapter/netconf/AppcNetconfAdapterActivator.java
@@ -43,13 +43,6 @@ public class AppcNetconfAdapterActivator implements BundleActivator {
private ServiceRegistration reporterRegistration = null;
private ServiceRegistration factoryRegistration = null;
private ServiceRegistration dbRegistration = null;
-
- /**
- * The reference to the actual implementation object that implements the services
- */
- private NetconfClientFactory clientFactory;
- private NetconfDataAccessService DAService;
-
/**
* The logger to be used
*/
@@ -73,24 +66,22 @@ public class AppcNetconfAdapterActivator implements BundleActivator {
@Override
public void start(BundleContext context) throws Exception {
if (registration == null) {
- clientFactory = new NetconfClientFactory();
+ /*
+ * The reference to the actual implementation object that implements the services
+ */
+ NetconfClientFactory clientFactory = new NetconfClientFactory();
factoryRegistration = context.registerService(NetconfClientFactory.class, clientFactory, null);
-
- DAService = new NetconfDataAccessServiceImpl();
+ NetconfDataAccessService DAService = new NetconfDataAccessServiceImpl();
//set dblib service
DbLibService dblibSvc = null;
ServiceReference sref = context.getServiceReference(DbLibService.class.getName());
- try{
dblibSvc = (DbLibService)context.getService(sref);
- }catch(Exception e){
- logger.error(e.getMessage());
- }
DAService.setDbLibService(dblibSvc);
///////////////////////////////////
factoryRegistration = context.registerService(NetconfDataAccessService.class, DAService, null);
}
- logger.info(Msg.COMPONENT_INITIALIZED, "NETCONF adapter");
+ //logger.info(Msg.COMPONENT_INITIALIZED, "NETCONF adapter");
}
/**
diff --git a/appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/src/main/java/org/onap/appc/adapter/netconf/internal/NetconfDataAccessServiceImpl.java b/appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/src/main/java/org/onap/appc/adapter/netconf/internal/NetconfDataAccessServiceImpl.java
index f3cca8597..6ed181d1d 100644
--- a/appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/src/main/java/org/onap/appc/adapter/netconf/internal/NetconfDataAccessServiceImpl.java
+++ b/appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/src/main/java/org/onap/appc/adapter/netconf/internal/NetconfDataAccessServiceImpl.java
@@ -39,7 +39,7 @@ import java.util.ArrayList;
public class NetconfDataAccessServiceImpl implements NetconfDataAccessService {
- private static EELFLogger logger = EELFManager.getInstance().getLogger(NetconfDataAccessServiceImpl.class);
+ private final EELFLogger logger = EELFManager.getInstance().getLogger(NetconfDataAccessServiceImpl.class);
public void setSchema(String schema) {
this.schema = schema;