Fix minor code smells
[aai/search-data-service.git] / src / main / java / org / onap / aai / sa / searchdbabstraction / service / SearchService.java
index 350ddf0..a35062b 100644 (file)
@@ -1,4 +1,4 @@
-/**
+/**
  * ============LICENSE_START=======================================================
  * org.onap.aai
  * ================================================================================
@@ -21,6 +21,7 @@
 package org.onap.aai.sa.searchdbabstraction.service;
 
 import java.io.FileInputStream;
+import java.io.IOException;
 import java.util.Properties;
 import org.onap.aai.cl.api.Logger;
 import org.onap.aai.cl.eelf.LoggerFactory;
@@ -30,10 +31,7 @@ import org.onap.aai.sa.searchdbabstraction.logging.SearchDbMsgs;
 import org.onap.aai.sa.searchdbabstraction.util.SearchDbConstants;
 import org.springframework.beans.factory.annotation.Autowired;
 
-
 public class SearchService {
-    private ElasticSearchHttpController esController = null;
-
     static Logger logger = LoggerFactory.getInstance().getLogger(SearchService.class.getName());
 
     @Autowired
@@ -47,10 +45,10 @@ public class SearchService {
         }
     }
 
-    protected void start() throws Exception {
+    protected void start() throws IOException {
         Properties configProperties = new Properties();
         configProperties.load(new FileInputStream(SearchDbConstants.ES_CONFIG_FILE));
-        esController = new ElasticSearchHttpController(esConfig);
+        new ElasticSearchHttpController(esConfig);
         logger.info(SearchDbMsgs.SERVICE_STARTED);
     }
 }