summaryrefslogtreecommitdiffstats
path: root/restconf-client
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2019-01-07 15:50:58 +0000
committerGerrit Code Review <gerrit@onap.org>2019-01-07 15:50:58 +0000
commitaee81e2c6cf0f8d903887d4459e708100558d141 (patch)
tree4ef152bce0c715007a7050bb82b9fd9cba100a48 /restconf-client
parentc5d6e4dd7a03c6bae096d850cb766fa03beaa741 (diff)
parent970e528c4996b4994d3e40d1c3a2296af4760563 (diff)
Merge "Sonar fix: LeafNode.java"
Diffstat (limited to 'restconf-client')
-rw-r--r--restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/LeafNode.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/LeafNode.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/LeafNode.java
index c9cf95ba3..041175ca7 100644
--- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/LeafNode.java
+++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/yangserializers/pnserializer/LeafNode.java
@@ -3,6 +3,8 @@
* ONAP - CCSDK
* ================================================================================
* Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
+ *
+ * Modifications Copyright © 2018 IBM
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,6 +31,7 @@ public class LeafNode extends PropertiesNode implements LeafListHolderChild, Dat
private String value;
private Namespace valueNs;
+ private static final String svcLogicException = "Leaf cannot hold child nodes";
/**
* Creates an instance of leaf node.
@@ -89,7 +92,7 @@ public class LeafNode extends PropertiesNode implements LeafListHolderChild, Dat
public PropertiesNode addChild(String name, Namespace namespace,
NodeType type,
Object appInfo) throws SvcLogicException {
- throw new SvcLogicException("Leaf cannot hold child nodes");
+ throw new SvcLogicException(svcLogicException);
}
@Override
@@ -97,7 +100,7 @@ public class LeafNode extends PropertiesNode implements LeafListHolderChild, Dat
NodeType type, String value,
Namespace valueNs,
Object appInfo) throws SvcLogicException {
- throw new SvcLogicException("Leaf cannot hold child nodes");
+ throw new SvcLogicException(svcLogicException);
}
@Override
@@ -105,7 +108,7 @@ public class LeafNode extends PropertiesNode implements LeafListHolderChild, Dat
Namespace namespace,
NodeType type,
Object appInfo) throws SvcLogicException {
- throw new SvcLogicException("Leaf cannot hold child nodes");
+ throw new SvcLogicException(svcLogicException);
}
@Override