aboutsummaryrefslogtreecommitdiffstats
path: root/cps-service
diff options
context:
space:
mode:
Diffstat (limited to 'cps-service')
-rw-r--r--cps-service/src/main/java/org/onap/cps/api/impl/CpsDataServiceImpl.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/cps-service/src/main/java/org/onap/cps/api/impl/CpsDataServiceImpl.java b/cps-service/src/main/java/org/onap/cps/api/impl/CpsDataServiceImpl.java
index 6386d38ffc..5a48428772 100644
--- a/cps-service/src/main/java/org/onap/cps/api/impl/CpsDataServiceImpl.java
+++ b/cps-service/src/main/java/org/onap/cps/api/impl/CpsDataServiceImpl.java
@@ -65,6 +65,7 @@ public class CpsDataServiceImpl implements CpsDataService {
private static final String ROOT_NODE_XPATH = "/";
private static final long DEFAULT_LOCK_TIMEOUT_IN_MILLISECONDS = 300L;
+ private static final String NO_DATA_NODES = "No data nodes.";
private final CpsDataPersistenceService cpsDataPersistenceService;
private final CpsDataUpdateEventsService cpsDataUpdateEventsService;
@@ -425,7 +426,7 @@ public class CpsDataServiceImpl implements CpsDataService {
.withContainerNode(containerNode)
.buildCollection();
if (dataNodes.isEmpty()) {
- throw new DataValidationException("No data nodes.", "No data nodes provided");
+ throw new DataValidationException(NO_DATA_NODES, "No data nodes provided");
}
return dataNodes;
}
@@ -437,7 +438,7 @@ public class CpsDataServiceImpl implements CpsDataService {
.withContainerNode(containerNode)
.buildCollection();
if (dataNodes.isEmpty()) {
- throw new DataValidationException("No data nodes.", "No data nodes provided");
+ throw new DataValidationException(NO_DATA_NODES, "No data nodes provided");
}
return dataNodes;
}
@@ -453,8 +454,7 @@ public class CpsDataServiceImpl implements CpsDataService {
.withContainerNode(containerNode)
.buildCollection();
if (dataNodes.isEmpty()) {
- throw new DataValidationException("No data nodes.",
- "Data nodes were not found under the xpath " + xpath);
+ throw new DataValidationException(NO_DATA_NODES, "Data nodes were not found under the xpath " + xpath);
}
return dataNodes;
}
@@ -466,7 +466,7 @@ public class CpsDataServiceImpl implements CpsDataService {
.withContainerNode(containerNode)
.buildCollection();
if (dataNodes.isEmpty()) {
- throw new DataValidationException("No data nodes.", "Data nodes were not found under the xpath " + xpath);
+ throw new DataValidationException(NO_DATA_NODES, "Data nodes were not found under the xpath " + xpath);
}
return dataNodes;
}