summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorSudarshan Kumar <sudars19@in.ibm.com>2019-07-10 15:23:31 +0530
committerSudarshan Kumar <sudars19@in.ibm.com>2019-07-10 15:25:05 +0530
commit66d5510693e52f9a09dfa9414b364308a15ba8f3 (patch)
tree1eb7a1c785b21d366a3fa7813ee911308a355119 /src/main
parenta83c036d46be00d1ca0b6bbff27382aa847240e1 (diff)
Sonar Fix - Remove the boxing to Boolean
Remove the boxing to Boolean. The argument is already of the same type Issue-ID: MUSIC-431 Change-Id: Ia5eb5f180d50fd8737c456ae53a493bbcb2b28a7 Signed-off-by: Sudarshan Kumar <sudars19@in.ibm.com>
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/onap/music/eelf/logging/MusicLoggingServletFilter.java18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/main/java/org/onap/music/eelf/logging/MusicLoggingServletFilter.java b/src/main/java/org/onap/music/eelf/logging/MusicLoggingServletFilter.java
index 7eca73e1..0f078a97 100644
--- a/src/main/java/org/onap/music/eelf/logging/MusicLoggingServletFilter.java
+++ b/src/main/java/org/onap/music/eelf/logging/MusicLoggingServletFilter.java
@@ -4,6 +4,8 @@
* ===================================================================
* Copyright (c) 2017 AT&T Intellectual Property
* ===================================================================
+ * Modifications Copyright (C) 2019 IBM
+ * ===================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -107,44 +109,44 @@ public class MusicLoggingServletFilter implements Filter {
.collect(Collectors.toMap(entry -> entry.getKey().toUpperCase(), entry -> entry.getValue()));
// Enable/disable keys are present in /opt/app/music/etc/music.properties
- if (Boolean.valueOf(MusicUtil.getTransIdRequired())
+ if (MusicUtil.getTransIdRequired()
&& !upperCaseHeaderMap.containsKey(TRANSACTION_ID.toUpperCase())) {
populateError(httpResponse, "Transaction id '" + TRANSACTION_ID
+ "' required on http header");
return;
} else {
populateMDCAndResponseHeader(upperCaseHeaderMap, TRANSACTION_ID, "transactionId",
- Boolean.valueOf(MusicUtil.getTransIdRequired()), httpResponse);
+ MusicUtil.getTransIdRequired(), httpResponse);
}
- if (Boolean.valueOf(MusicUtil.getConversationIdRequired())
+ if (MusicUtil.getConversationIdRequired()
&& !upperCaseHeaderMap.containsKey(CONVERSATION_ID.toUpperCase())) {
populateError(httpResponse, "Conversation Id '" + CONVERSATION_ID
+ "' required on http header");
return;
} else {
populateMDCAndResponseHeader(upperCaseHeaderMap, CONVERSATION_ID, "conversationId",
- Boolean.valueOf(MusicUtil.getConversationIdRequired()), httpResponse);
+ MusicUtil.getConversationIdRequired(), httpResponse);
}
- if (Boolean.valueOf(MusicUtil.getMessageIdRequired())
+ if (MusicUtil.getMessageIdRequired()
&& !upperCaseHeaderMap.containsKey(MESSAGE_ID.toUpperCase())) {
populateError(httpResponse, "Message Id '" + MESSAGE_ID
+ "' required on http header");
return;
} else {
populateMDCAndResponseHeader(upperCaseHeaderMap, MESSAGE_ID, "messageId",
- Boolean.valueOf(MusicUtil.getMessageIdRequired()), httpResponse);
+ MusicUtil.getMessageIdRequired(), httpResponse);
}
- if (Boolean.valueOf(MusicUtil.getClientIdRequired())
+ if (MusicUtil.getClientIdRequired()
&& !upperCaseHeaderMap.containsKey(CLIENT_ID.toUpperCase())) {
populateError(httpResponse, "Client Id '" + CLIENT_ID
+ "' required on http header");
return;
} else {
populateMDCAndResponseHeader(upperCaseHeaderMap, CLIENT_ID, "clientId",
- Boolean.valueOf(MusicUtil.getClientIdRequired()), httpResponse);
+ MusicUtil.getClientIdRequired(), httpResponse);
}
}