From 3a091cb222f1a6b3564f1cc248f4041e6cc66f07 Mon Sep 17 00:00:00 2001 From: shashikanth Date: Thu, 21 Sep 2017 17:20:03 +0530 Subject: Fix major sonar issues Fix Major sonar issues in aai/traversal module https://sonar.onap.org/component_issues?id=org.onap.aai.traversal%3Atraversal#resolved=false|severities=MAJOR Fixed string literal on the left side of this string comparison Issue-Id:AAI-212 Change-Id: I41fab87df2e9c32f3ab2a07db9ab5aadc9c91d25 Signed-off-by: shashikanth.vh --- .../src/main/java/org/openecomp/aai/rest/search/SearchProvider.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'aai-traversal') diff --git a/aai-traversal/src/main/java/org/openecomp/aai/rest/search/SearchProvider.java b/aai-traversal/src/main/java/org/openecomp/aai/rest/search/SearchProvider.java index ee6b1ab..4330db1 100644 --- a/aai-traversal/src/main/java/org/openecomp/aai/rest/search/SearchProvider.java +++ b/aai-traversal/src/main/java/org/openecomp/aai/rest/search/SearchProvider.java @@ -105,7 +105,7 @@ public class SearchProvider extends RESTAPI { //only consider header value for search DBConnectionType type = this.determineConnectionType("force-cache", realTime); final Version version; - if (versionParam.equals("latest")) { + if ("latest".equals(versionParam)) { version = AAIProperties.LATEST; } else { version = Version.valueOf(versionParam); @@ -197,7 +197,7 @@ public class SearchProvider extends RESTAPI { DBConnectionType type = this.determineConnectionType("force-cache", realTime); final Version version; - if (versionParam.equals("latest")) { + if ("latest".equals(versionParam)) { version = AAIProperties.LATEST; } else { version = Version.valueOf(versionParam); -- cgit 1.2.3-korg