diff options
author | David Brilla <xbrilla@fi.muni.cz> | 2020-03-24 13:08:36 +0100 |
---|---|---|
committer | David Brilla <david.brilla@tieto.com> | 2020-04-21 11:29:53 +0200 |
commit | 6915f57d07f466a6dd54be693b2af2cec9b8e0c1 (patch) | |
tree | 7c1309f6575aee88434fca15b2001e72f81a46bc /aai-els-onap-logging/src | |
parent | 71d81fa49428fcd2080844482e4e1205a9481ae4 (diff) |
AAI-common sonar fixes
Issue-ID: AAI-2786
Change-Id: Ia37e660886fce56c8ab5c53888fcbf265692a359
Signed-off-by: David Brilla <david.brilla@tieto.com>
Diffstat (limited to 'aai-els-onap-logging/src')
3 files changed, 12 insertions, 12 deletions
diff --git a/aai-els-onap-logging/src/main/java/org/onap/aai/domain/restPolicyException/Fault.java b/aai-els-onap-logging/src/main/java/org/onap/aai/domain/restPolicyException/Fault.java index d1403ad2..fe51ab05 100644 --- a/aai-els-onap-logging/src/main/java/org/onap/aai/domain/restPolicyException/Fault.java +++ b/aai-els-onap-logging/src/main/java/org/onap/aai/domain/restPolicyException/Fault.java @@ -357,7 +357,7 @@ public class Fault { */ public List<String> getVariable() { if (variable == null) { - variable = new ArrayList<String>(); + variable = new ArrayList<>(); } return this.variable; } diff --git a/aai-els-onap-logging/src/main/java/org/onap/aai/domain/restResponseInfo/Info.java b/aai-els-onap-logging/src/main/java/org/onap/aai/domain/restResponseInfo/Info.java index 268b7673..f4a4b47f 100644 --- a/aai-els-onap-logging/src/main/java/org/onap/aai/domain/restResponseInfo/Info.java +++ b/aai-els-onap-logging/src/main/java/org/onap/aai/domain/restResponseInfo/Info.java @@ -188,7 +188,7 @@ public class Info { */ public List<ResponseMessage> getResponseMessage() { if (responseMessage == null) { - responseMessage = new ArrayList<ResponseMessage>(); + responseMessage = new ArrayList<>(); } return this.responseMessage; } @@ -361,7 +361,7 @@ public class Info { */ public List<String> getVariable() { if (variable == null) { - variable = new ArrayList<String>(); + variable = new ArrayList<>(); } return this.variable; } diff --git a/aai-els-onap-logging/src/main/java/org/onap/aai/exceptions/AAIExceptionWithInfo.java b/aai-els-onap-logging/src/main/java/org/onap/aai/exceptions/AAIExceptionWithInfo.java index e7f2901e..3ba07532 100644 --- a/aai-els-onap-logging/src/main/java/org/onap/aai/exceptions/AAIExceptionWithInfo.java +++ b/aai-els-onap-logging/src/main/java/org/onap/aai/exceptions/AAIExceptionWithInfo.java @@ -20,11 +20,11 @@ package org.onap.aai.exceptions; -import java.util.HashMap; +import java.util.Map; public class AAIExceptionWithInfo extends AAIException { - HashMap<String, Object> infoHash; + Map<String, Object> infoHash; String info; /** @@ -33,7 +33,7 @@ public class AAIExceptionWithInfo extends AAIException { * @param infoHash the info hash * @param info the info */ - public AAIExceptionWithInfo(HashMap<String, Object> infoHash, String info) { + public AAIExceptionWithInfo(Map<String, Object> infoHash, String info) { super(); setInfoHash(infoHash); setInfo(info); @@ -46,7 +46,7 @@ public class AAIExceptionWithInfo extends AAIException { * @param infoHash the info hash * @param info the info */ - public AAIExceptionWithInfo(String code, HashMap<String, Object> infoHash, String info) { + public AAIExceptionWithInfo(String code, Map<String, Object> infoHash, String info) { super(code); setInfoHash(infoHash); setInfo(info); @@ -60,7 +60,7 @@ public class AAIExceptionWithInfo extends AAIException { * @param infoHash the info hash * @param info the info */ - public AAIExceptionWithInfo(String code, String details, HashMap<String, Object> infoHash, String info) { + public AAIExceptionWithInfo(String code, String details, Map<String, Object> infoHash, String info) { super(code, details); setInfoHash(infoHash); setInfo(info); @@ -74,7 +74,7 @@ public class AAIExceptionWithInfo extends AAIException { * @param infoHash the info hash * @param info the info */ - public AAIExceptionWithInfo(String code, Throwable cause, HashMap<String, Object> infoHash, String info) { + public AAIExceptionWithInfo(String code, Throwable cause, Map<String, Object> infoHash, String info) { super(code, cause); setInfoHash(infoHash); setInfo(info); @@ -89,7 +89,7 @@ public class AAIExceptionWithInfo extends AAIException { * @param infoHash the info hash * @param info the info */ - public AAIExceptionWithInfo(String code, Throwable cause, String details, HashMap<String, Object> infoHash, + public AAIExceptionWithInfo(String code, Throwable cause, String details, Map<String, Object> infoHash, String info) { super(code, cause, details); setInfoHash(infoHash); @@ -101,7 +101,7 @@ public class AAIExceptionWithInfo extends AAIException { * * @return the info hash */ - public HashMap<String, Object> getInfoHash() { + public Map<String, Object> getInfoHash() { return infoHash; } @@ -110,7 +110,7 @@ public class AAIExceptionWithInfo extends AAIException { * * @param infoHash the info hash */ - public void setInfoHash(HashMap<String, Object> infoHash) { + public void setInfoHash(Map<String, Object> infoHash) { this.infoHash = infoHash; } |