mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-10-18 10:51:04 +02:00
If dataNodeList if null or empty, the following code dataNodeList.get(0) will get an error.
Change-Id: Ia2599f7b6a8af3823497c0f6a3098de931f5407a
This commit is contained in:
parent
4c615ac8d8
commit
d34aaf27ee
@ -230,6 +230,10 @@ public class RestconfManager implements RestconfService {
|
||||
ResourceData receivedData = convertJsonToDataNode(rmLastPathSegment(rl.uriForYangRuntime()), rootNode);
|
||||
ResourceId rid = receivedData.resourceId();
|
||||
List<DataNode> dataNodeList = receivedData.dataNodes();
|
||||
if (dataNodeList == null || dataNodeList.isEmpty()) {
|
||||
log.warn("There is no one Data Node can be proceed.");
|
||||
return;
|
||||
}
|
||||
if (dataNodeList.size() > 1) {
|
||||
log.warn("There are more than one Data Node can be proceed: {}", dataNodeList.size());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user