Fix sonar issues in crud/logging/LoggingUtil 21/55321/1
authorSwiton Tomasz <tomasz.switon@nokia.com>
Mon, 25 Jun 2018 12:16:51 +0000 (14:16 +0200)
committerSwiton Tomasz <tomasz.switon@nokia.com>
Mon, 25 Jun 2018 12:16:51 +0000 (14:16 +0200)
Change-Id: I539a60204dd6da73a549e2a995b89f6a0febc2fc
Issue-ID: AAI-1238
Signed-off-by: Switon Tomasz <tomasz.switon@nokia.com>
src/main/java/org/onap/crud/logging/LoggingUtil.java

index 31c0c1f..2ee695f 100644 (file)
@@ -79,8 +79,8 @@ public class LoggingUtil {
     auditLogger.info(CrudServiceMsgs.PROCESS_REST_REQUEST,
         new LogFields().setField(LogLine.DefinedFields.RESPONSE_CODE, response.getStatus())
             .setField(LogLine.DefinedFields.RESPONSE_DESCRIPTION, respStatusString),
-        (req != null) ? req.getMethod() : "Unknown", (req != null) ? req.getRequestURL().toString() : "Unknown",
-        (req != null) ? req.getRemoteHost() : "Unknown", Integer.toString(response.getStatus()) + " payload: "
+        req.getMethod(), req.getRequestURL().toString(),
+        req.getRemoteHost(), Integer.toString(response.getStatus()) + " payload: "
             + (response.getEntity() == null ? "" : response.getEntity().toString()));
     MDC.clear();
   }