summaryrefslogtreecommitdiffstats
path: root/sdnr/wt/apigateway/provider/src/main
diff options
context:
space:
mode:
authorMichael Dürre <michael.duerre@highstreet-technologies.com>2020-07-15 12:33:56 +0200
committerMichael Dürre <michael.duerre@highstreet-technologies.com>2020-07-15 12:34:12 +0200
commit34299d910aa2a2bc423153bd2e91c9940efca21e (patch)
tree9c9e7f8d1346a1a055cff6cc3dc9d24e430478a8 /sdnr/wt/apigateway/provider/src/main
parent5dfcc4c815f930edb9fc9f5f94a9ef6d9791a709 (diff)
cleanup apigateway code
removed unused code and fixed warnings Issue-ID: CCSDK-2558 Signed-off-by: Michael Dürre <michael.duerre@highstreet-technologies.com> Change-Id: I8827abe8932a8422dc27b166d742c46184109426
Diffstat (limited to 'sdnr/wt/apigateway/provider/src/main')
-rw-r--r--sdnr/wt/apigateway/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/apigateway/AaiServlet.java3
-rw-r--r--sdnr/wt/apigateway/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/apigateway/BaseServlet.java10
-rw-r--r--sdnr/wt/apigateway/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/apigateway/EsServlet.java7
-rw-r--r--sdnr/wt/apigateway/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/apigateway/MyProperties.java12
4 files changed, 5 insertions, 27 deletions
diff --git a/sdnr/wt/apigateway/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/apigateway/AaiServlet.java b/sdnr/wt/apigateway/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/apigateway/AaiServlet.java
index 0cdf79d43..219e75a78 100644
--- a/sdnr/wt/apigateway/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/apigateway/AaiServlet.java
+++ b/sdnr/wt/apigateway/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/apigateway/AaiServlet.java
@@ -27,9 +27,6 @@ import javax.servlet.http.HttpServletResponse;
public class AaiServlet extends BaseServlet {
- /**
- *
- */
private static final long serialVersionUID = 5946205120796162644L;
private static final String OFFLINE_RESPONSE_MESSAGE = "AAI interface is offline";
private static boolean trustAll = false;
diff --git a/sdnr/wt/apigateway/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/apigateway/BaseServlet.java b/sdnr/wt/apigateway/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/apigateway/BaseServlet.java
index dab7ad776..7c8a9a1d9 100644
--- a/sdnr/wt/apigateway/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/apigateway/BaseServlet.java
+++ b/sdnr/wt/apigateway/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/apigateway/BaseServlet.java
@@ -32,7 +32,6 @@ import java.security.NoSuchAlgorithmException;
import java.util.Enumeration;
import java.util.List;
import java.util.Map;
-
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLContext;
@@ -41,15 +40,11 @@ import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public abstract class BaseServlet extends HttpServlet {
- /**
- *
- */
private static final long serialVersionUID = 7403047480257892794L;
private static Logger LOG = LoggerFactory.getLogger(BaseServlet.class);
private static SSLContext sc;
@@ -66,11 +61,6 @@ public abstract class BaseServlet extends HttpServlet {
protected abstract String getRemoteUrl(String uri);
- /**
- *
- * @throws NoSuchAlgorithmException
- * @throws KeyManagementException
- */
private static void setupSslTrustAll(boolean trustall) throws NoSuchAlgorithmException, KeyManagementException {
sc = SSLContext.getInstance("TLSv1.2");
diff --git a/sdnr/wt/apigateway/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/apigateway/EsServlet.java b/sdnr/wt/apigateway/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/apigateway/EsServlet.java
index 5db305ecb..f3871a5c4 100644
--- a/sdnr/wt/apigateway/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/apigateway/EsServlet.java
+++ b/sdnr/wt/apigateway/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/apigateway/EsServlet.java
@@ -25,17 +25,10 @@ import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
public class EsServlet extends BaseServlet {
- /**
- *
- */
private static final long serialVersionUID = -3996363343749995011L;
private static final String OFFLINE_RESPONSE_MESSAGE = "Database interface is offline";
- private static Logger LOG = LoggerFactory.getLogger(EsServlet.class);
private static boolean trustAll = false;
diff --git a/sdnr/wt/apigateway/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/apigateway/MyProperties.java b/sdnr/wt/apigateway/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/apigateway/MyProperties.java
index d49b4dce2..d644c63a3 100644
--- a/sdnr/wt/apigateway/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/apigateway/MyProperties.java
+++ b/sdnr/wt/apigateway/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/apigateway/MyProperties.java
@@ -28,7 +28,6 @@ import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
-
import org.json.JSONArray;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -43,12 +42,6 @@ public class MyProperties {
private static final String DEFAULT_ESDATABASE = "http://sdnrdb:9200";
private static final String DEFAULT_AAI = "off";
- @Override
- public String toString() {
- return "MyProperties [aaiBase=" + aaiBase + ", aaiHeaders=" + aaiHeaders + ", esBase=" + esBase
- + ", trustInsecure=" + trustInsecure + ", corsEnabled=" + corsEnabled + "]";
- }
-
private static MyProperties mObj;
private String aaiBase;
@@ -168,4 +161,9 @@ public class MyProperties {
return mObj;
}
+ @Override
+ public String toString() {
+ return "MyProperties [aaiBase=" + aaiBase + ", aaiHeaders=" + aaiHeaders + ", esBase=" + esBase
+ + ", trustInsecure=" + trustInsecure + ", corsEnabled=" + corsEnabled + "]";
+ }
}