aboutsummaryrefslogtreecommitdiffstats
path: root/ms
diff options
context:
space:
mode:
authorSandeep J <sandeejh@in.ibm.com>2018-12-11 17:10:13 +0530
committerSandeep J <sandeejh@in.ibm.com>2018-12-11 17:10:20 +0530
commit29ebc35c200d77c49ea7c989d48bb51a8927c5c6 (patch)
tree2ce211b0fe19aadd723bb82351e8d9f09eae0b6f /ms
parent5af5cf4e6abeeec0c5ec0ad5108765a150499567 (diff)
fixed sonar issues in ConfigModelService.java
fixed sonar issues Issue-ID: CCSDK-552 Change-Id: Iab02d1cee2b0cb9e182f9d4af839000307ec99bf Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
Diffstat (limited to 'ms')
-rw-r--r--ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/ConfigModelService.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/ConfigModelService.java b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/ConfigModelService.java
index a2f653c67..b2fff26ef 100644
--- a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/ConfigModelService.java
+++ b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/ConfigModelService.java
@@ -55,6 +55,7 @@ public class ConfigModelService {
private ConfigModelRepository configModelRepository;
private ConfigModelContentRepository configModelContentRepository;
private ConfigModelCreateService configModelCreateService;
+ private static final String CONFIG_MODEL_ID_FAILURE_MSG= "failed to get config model id(%d) from repo";
/**
* This is a ConfigModelService constructor.
@@ -174,7 +175,7 @@ public class ConfigModelService {
if (dbConfigModel.isPresent()) {
configModel = dbConfigModel.get();
} else {
- throw new BluePrintException(String.format("failed to get config model id(%d) from repo", id));
+ throw new BluePrintException(String.format(CONFIG_MODEL_ID_FAILURE_MSG, id));
}
return configModel;
@@ -232,7 +233,7 @@ public class ConfigModelService {
}
}
} else {
- throw new BluePrintException(String.format("failed to get config model id(%d) from repo", id));
+ throw new BluePrintException(String.format(CONFIG_MODEL_ID_FAILURE_MSG, id));
}
return cloneConfigModel;
@@ -252,7 +253,7 @@ public class ConfigModelService {
configModelContentRepository.deleteByConfigModel(dbConfigModel.get());
configModelRepository.delete(dbConfigModel.get());
} else {
- throw new BluePrintException(String.format("failed to get config model id(%d) from repo", id));
+ throw new BluePrintException(String.format(CONFIG_MODEL_ID_FAILURE_MSG, id));
}
}