aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSmokowski, Kevin (ks6305) <kevin.smokowski@att.com>2018-10-04 19:18:28 +0000
committerSmokowski, Kevin (ks6305) <kevin.smokowski@att.com>2018-10-04 19:18:28 +0000
commita68b1d51bdb4b5fb8575b7029b86d2d1abbfdace (patch)
treeae3e49ddfbc391b92eebb6b5c5067cadb160dac8
parent57539c114eadc1977c662efaad53f253cccdcb1d (diff)
throw an exception if an executor is missing
If trying to execute a node of a type which has no registered executor throw an exception instead of continuing to execute Change-Id: Ic0a785e97ad85eb886f822e87a78347d9ea6563a Issue-ID: CCSDK-610 Signed-off-by: Smokowski, Kevin (ks6305) <kevin.smokowski@att.com>
-rwxr-xr-x[-rw-r--r--]sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SvcLogicServiceImpl.java24
1 files changed, 2 insertions, 22 deletions
diff --git a/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SvcLogicServiceImpl.java b/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SvcLogicServiceImpl.java
index d83bfebc..000c2872 100644..100755
--- a/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SvcLogicServiceImpl.java
+++ b/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/SvcLogicServiceImpl.java
@@ -70,6 +70,7 @@ public class SvcLogicServiceImpl implements SvcLogicService {
put("update", new UpdateNodeExecutor());
put("break", new BreakNodeExecutor());
put("while", new WhileNodeExecutor());
+
}
};
@@ -180,28 +181,7 @@ public class SvcLogicServiceImpl implements SvcLogicService {
executor.getClass().getName());
return (executor.execute(this, node, ctx));
} else {
- if (LOG.isDebugEnabled()) {
- LOG.debug("{} node not implemented", node.getNodeType());
- }
- SvcLogicNode nextNode = node.getOutcomeValue("failure");
- if (nextNode != null) {
- if (LOG.isDebugEnabled()) {
- LOG.debug("about to execute failure branch");
- }
- return (nextNode);
- }
-
- nextNode = node.getOutcomeValue("Other");
- if (nextNode != null) {
- if (LOG.isDebugEnabled()) {
- LOG.debug("about to execute Other branch");
- }
- } else {
- if (LOG.isDebugEnabled()) {
- LOG.debug("no failure or Other branch found");
- }
- }
- return (nextNode);
+ throw new SvcLogicException("Attempted to execute a node of type " + node.getNodeType() + ", but no executor was registered for this type");
}
}