[YANGTOOLS-431] Yang Data Codec Gson: null pointer exception when trying to deserialize leafref value Created: 25/Mar/15  Updated: 10/Apr/22  Resolved: 27/Mar/15

Status: Resolved
Project: yangtools
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Jan Hajnar Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 2894

 Description   

When trying to call Rpc with input that has extended types referencing leafref nodes from another module, parsing of Json fails with null pointer exception.

example model:
(nt is network-topology module)
leaf node

{ mandatory true; type nt:node-ref; description "Network node end point."; }

leaf-list supporting-tp

{ type nt:tp-ref; description "List of termination points that support end point TP. If forwarding adjacency announcement triggers termination point creation, this list is used to fill tp-ref attribute."; }

leaf tp-id

{ type nt:tp-id; description "Forwarding adjacency interface unique identifier. If forwarding adjacency announcement triggers termination point creation, this id is used for TP creation."; }

Bug can be reproduced by calling this rpc from topoproccessing project: http://127.0.0.1:8181/restconf/operations/multilayer-topology:forwarding-adj-announce

input:
{
"input": {
"head-end":

{ "node": "A", "supporting-tp": [ "/network-topology/topology[topology-id='TOPO']/node[node-id='1']/termination-point[network-topology:tp-id='1:3']" ], "tp-id": "A:1" }

,
"tail-end":

{ "node": "B", "supporting-tp": [ "/network-topology/topology[topology-id='TOPO']/node[node-id='2']/termination-point[network-topology:tp-id='2:3']" ], "tp-id": "B:1" }

,
"bidirectional" : {}
}
}



 Comments   
Comment by Jan Hajnar [ 25/Mar/15 ]

patch:
https://git.opendaylight.org/gerrit/#/c/17105/

Generated at Wed Feb 07 20:53:13 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.