From c8f7e3f376992b202ba26464b9b329d6c4b2821d Mon Sep 17 00:00:00 2001 From: Michael DÜrre Date: Tue, 24 Aug 2021 06:16:11 +0200 Subject: fix some sdnr sonar bugs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sonar fixes for some sdnr components Issue-ID: SDNC-1590 Change-Id: I02e44b6f5477bcd0490c3499caf20228eb9772ed Signed-off-by: Michael DÜrre --- .../org/onap/ccsdk/features/sdnr/wt/apigateway/MyProperties.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sdnr/wt/apigateway') 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 66cbd02e9..560330f85 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 @@ -150,7 +150,7 @@ public class MyProperties { in.close(); this.aaiBase = getProperty(defaultProps,"aai", DEFAULT_AAI); - this.aaiHeaders = _parseHeadersMap(getProperty(defaultProps,"aaiHeaders", DEFAULT_AAI_HEADERS)); + this.aaiHeaders = parseHeadersMap(getProperty(defaultProps,"aaiHeaders", DEFAULT_AAI_HEADERS)); this.esBase = getProperty(defaultProps,"database", DEFAULT_ESDATABASE); this.tilesBase = getProperty(defaultProps,"tiles", DEFAULT_TILES, DEFAULT_URL_OFF); this.topologyBase = getProperty(defaultProps,"topology", DEFAULT_TOPOLOGY, DEFAULT_URL_OFF); @@ -187,12 +187,12 @@ public class MyProperties { } value = tmp; } - if((value==null || value == "") && valueIfEmpty!=null) { + if((value==null || value.isEmpty()) && valueIfEmpty!=null) { value = valueIfEmpty; } return value; } - private static Map _parseHeadersMap(String s) { + private static Map parseHeadersMap(String s) { Map r = new HashMap<>(); try { JSONArray a = new JSONArray(s); -- cgit 1.2.3-korg