aboutsummaryrefslogtreecommitdiffstats
path: root/ms/controllerblueprints/modules
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2018-12-11 17:33:32 +0000
committerGerrit Code Review <gerrit@onap.org>2018-12-11 17:33:32 +0000
commit98ce18949fa51b1058c44b35bb198c0e1e38da5a (patch)
tree3c45b2524f5147fa7ff6315499a51dc7dd144ee3 /ms/controllerblueprints/modules
parentca727b88aba9e8a61e082efcb64abc1f3a19d822 (diff)
parent7a09c652717e7253417bcba2bccb72f0c0da5cb9 (diff)
Merge "fixed sonar issues in ConfigModelService.java"
Diffstat (limited to 'ms/controllerblueprints/modules')
-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 a2f653c6..b2fff26e 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));
}
}