aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeServlet.java16
-rw-r--r--datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/DRProvCadiFilter.java16
2 files changed, 12 insertions, 20 deletions
diff --git a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeServlet.java b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeServlet.java
index 93e901f9..34c0f5a6 100644
--- a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeServlet.java
+++ b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeServlet.java
@@ -27,14 +27,20 @@ package org.onap.dmaap.datarouter.node;
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
import org.apache.log4j.Logger;
+import org.jetbrains.annotations.Nullable;
import org.onap.dmaap.datarouter.node.eelf.EelfMsgs;
import org.slf4j.MDC;
-import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import java.io.*;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.Writer;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
@@ -43,10 +49,6 @@ import java.util.regex.Pattern;
import static org.onap.dmaap.datarouter.node.NodeUtils.sendResponseError;
-import org.jetbrains.annotations.Nullable;
-
-import static org.onap.dmaap.datarouter.node.NodeUtils.*;
-
/**
* Servlet for handling all http and https requests to the data router node
* <p>
@@ -64,7 +66,7 @@ public class NodeServlet extends HttpServlet {
private static NodeConfigManager config;
private static Pattern MetaDataPattern;
private static EELFLogger eelflogger = EELFManager.getInstance().getLogger(NodeServlet.class);
- private boolean isAAFFeed = false;
+ private static boolean isAAFFeed = false;
private final Delivery delivery;
static {
diff --git a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/DRProvCadiFilter.java b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/DRProvCadiFilter.java
index fb8b0724..688a32f6 100644
--- a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/DRProvCadiFilter.java
+++ b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/DRProvCadiFilter.java
@@ -48,19 +48,9 @@ public class DRProvCadiFilter extends CadiFilter {
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
- HttpServletRequest httpRequest = null;
- HttpServletResponse httpResponse = null;
- //cadi code
- try {
- httpRequest = (HttpServletRequest) request;
- httpResponse = (HttpServletResponse) response;
- } catch (ClassCastException e) {
- try {
- throw new ServletException("Only serving HTTP today", e);
- } catch (ServletException e1) {
- intlogger.error("PROV7001 DRProvCadiFilter.doFilter: ", e1);
- }
- }
+ HttpServletRequest httpRequest = (HttpServletRequest) request;
+ HttpServletResponse httpResponse = (HttpServletResponse) response;
+
EventLogRecord elr = new EventLogRecord(httpRequest);
String excludeAAF = httpRequest.getHeader(BaseServlet.EXCLUDE_AAF_HEADER);//send this param value as true, if want to add legacy feed/subscriber in AAF env