Code Review
/
policy
/
engine.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
More sonar cleanup and line consolidation
[policy/engine.git]
/
POLICY-SDK-APP
/
src
/
main
/
java
/
org
/
onap
/
policy
/
controller
/
CreateClosedLoopPMController.java
diff --git
a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateClosedLoopPMController.java
b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateClosedLoopPMController.java
index
4862efd
..
1ca027b
100644
(file)
--- a/
POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateClosedLoopPMController.java
+++ b/
POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateClosedLoopPMController.java
@@
-64,7
+64,7
@@
public class CreateClosedLoopPMController {
setPolicyAdapterNameValueAndDescription(policyAdapter, policy);
// Set PolicyAdapter JsonBodyData
setPolicyAdapterNameValueAndDescription(policyAdapter, policy);
// Set PolicyAdapter JsonBodyData
- setClosedLoopJ
SON
File(policyAdapter, entity);
+ setClosedLoopJ
son
File(policyAdapter, entity);
// Get the target data under policy.
TargetType target = policy.getTarget();
// Get the target data under policy.
TargetType target = policy.getTarget();
@@
-95,11
+95,10
@@
public class CreateClosedLoopPMController {
policyAdapter.setPolicyDescription(description);
}
policyAdapter.setPolicyDescription(description);
}
- private void setClosedLoopJSONFile(PolicyRestAdapter policyAdapter, PolicyEntity entity) {
- ObjectMapper mapper = new ObjectMapper();
+ private void setClosedLoopJsonFile(PolicyRestAdapter policyAdapter, PolicyEntity entity) {
try {
ClosedLoopPMBody closedLoopBody =
try {
ClosedLoopPMBody closedLoopBody =
-
mapper
.readValue(entity.getConfigurationData().getConfigBody(), ClosedLoopPMBody.class);
+
new ObjectMapper()
.readValue(entity.getConfigurationData().getConfigBody(), ClosedLoopPMBody.class);
policyAdapter.setJsonBodyData(closedLoopBody);
} catch (IOException e) {
LOGGER.error("Exception Occured" + e);
policyAdapter.setJsonBodyData(closedLoopBody);
} catch (IOException e) {
LOGGER.error("Exception Occured" + e);