summaryrefslogtreecommitdiffstats
path: root/POLICY-SDK-APP/src/main
diff options
context:
space:
mode:
authorManamohan Satapathy <MS00534989@techmahindra.com>2018-02-27 16:19:19 +0530
committerManamohan Satapathy <MS00534989@techmahindra.com>2018-02-27 16:20:41 +0530
commit3a7fd993131f3d6a1a192262be419aa3f5b0d64e (patch)
tree4527c66caba0504f9b4d5157b3c35017da65bbf1 /POLICY-SDK-APP/src/main
parent47c1630d48e40e1fbc051fa6eae251ffbe1d4945 (diff)
Policy:Major
Local variables should not shadow class field:L992 L1719 Issue-ID: POLICY-649 Sonar Link: https://sonar.onap.org/issues?myIssues=true&projectUuids=AV2blNLJ5bp_wwmIUP3L&resolved=false&severities=CRITICAL%2CMAJOR&types=CODE_SMELL Location:POLICY-SDK-APP\src\main\java\org\onap\policy\controller\CreateDcaeMicroServiceController.java Change-Id: I1d038829867c7d019473909650946a9539b5e736 Signed-off-by: Manamohan Satapathy <MS00534989@techmahindra.com>
Diffstat (limited to 'POLICY-SDK-APP/src/main')
-rw-r--r--POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateDcaeMicroServiceController.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateDcaeMicroServiceController.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateDcaeMicroServiceController.java
index d1043f709..ab4ea6d2d 100644
--- a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateDcaeMicroServiceController.java
+++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateDcaeMicroServiceController.java
@@ -989,9 +989,9 @@ public class CreateDcaeMicroServiceController extends RestrictedBaseController {
LOGGER.info("allkeys : " + allkeys);
}
- String allManyTrueKeys = "";
+ String nameOfTrueKey = "";
if(allkeys != null){
- allManyTrueKeys = allkeys.toString();
+ nameOfTrueKey = allkeys.toString();
}
String jsonModel = createMicroSeriveJson(returnModel, allkeys);
@@ -1035,10 +1035,10 @@ public class CreateDcaeMicroServiceController extends RestrictedBaseController {
PrintWriter out = response.getWriter();
String responseString = mapper.writeValueAsString(returnModel);
JSONObject j;
- if("".equals(allManyTrueKeys)){
+ if("".equals(nameOfTrueKey)){
j = new JSONObject("{dcaeModelData: " + responseString + ",jsonValue: " + jsonModel + "}");
}else{
- j = new JSONObject("{dcaeModelData: " + responseString + ",jsonValue: " + jsonModel + ",allManyTrueKeys: " + allManyTrueKeys+ "}");
+ j = new JSONObject("{dcaeModelData: " + responseString + ",jsonValue: " + jsonModel + ",allManyTrueKeys: " + nameOfTrueKey+ "}");
}
list.add(j);
out.write(list.toString());
@@ -1716,9 +1716,9 @@ public class CreateDcaeMicroServiceController extends RestrictedBaseController {
}
private List<File> listModelFiles(String directoryName) {
- File directory = new File(directoryName);
+ File fileDirectory = new File(directoryName);
List<File> resultList = new ArrayList<>();
- File[] fList = directory.listFiles();
+ File[] fList = fileDirectory.listFiles();
for (File file : fList) {
if (file.isFile()) {
resultList.add(file);