summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-common/src
diff options
context:
space:
mode:
authorManoop Talasila <talasila@research.att.com>2019-04-11 13:50:20 +0000
committerGerrit Code Review <gerrit@onap.org>2019-04-11 13:50:20 +0000
commiteaac4b655353df40c0fd56c90a2a9a9dfe0e1a6b (patch)
treebac84d451bfa6e43f9352a228a765c20197d1c41 /ecomp-sdk/epsdk-app-common/src
parent505266b86e1c9bd34b25e4419cb46ba00edc71fe (diff)
parentbc7a90fb8a3db81bd121e234ecd7fa16afbf0624 (diff)
Merge "Fix sonar issues in CamundaCockpitController"
Diffstat (limited to 'ecomp-sdk/epsdk-app-common/src')
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/CamundaCockpitController.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/CamundaCockpitController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/CamundaCockpitController.java
index c43b4acc..4c32b964 100644
--- a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/CamundaCockpitController.java
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/CamundaCockpitController.java
@@ -59,20 +59,22 @@ import org.springframework.web.bind.annotation.ResponseBody;
@Controller
@RequestMapping("/")
-public class CamundaCockpitController extends RestrictedBaseController {
+public class CamundaCockpitController extends RestrictedBaseController {
+
+ private static final String CAMUNDA_COCKPIT_LINK = "camunda_cockpit_link";
@SuppressWarnings("rawtypes")
@RequestMapping(value = {"/get_camunda_cockpit_link" }, method = RequestMethod.GET, produces = "application/json")
@ResponseBody
public Map getCamundaCockpitLink(HttpServletRequest request,HttpServletResponse response) {
- Map<String,String> map = new HashMap<String,String>();
+ Map<String,String> map = new HashMap<>();
String camundaCockpitUrl = "";
String camundaCockpitlinkDefined = "false";
- if (SystemProperties.containsProperty("camunda_cockpit_link")){
- camundaCockpitUrl = SystemProperties.getProperty("camunda_cockpit_link");
+ if (SystemProperties.containsProperty(CAMUNDA_COCKPIT_LINK)){
+ camundaCockpitUrl = SystemProperties.getProperty(CAMUNDA_COCKPIT_LINK);
camundaCockpitlinkDefined = "true";
};
map.put("link_defined", camundaCockpitlinkDefined);
- map.put("camunda_cockpit_link", camundaCockpitUrl);
+ map.put(CAMUNDA_COCKPIT_LINK, camundaCockpitUrl);
return map;
};
}