BUG-7850: YangLibProvider needs to accept null revisions 47/52247/1
authorRobert Varga <rovarga@cisco.com>
Fri, 24 Feb 2017 12:48:50 +0000 (13:48 +0100)
committerRobert Varga <rovarga@cisco.com>
Fri, 24 Feb 2017 12:48:50 +0000 (13:48 +0100)
commit9d6b3ed631ffa43a2dea2d021f1185815d98e725
treeeb5d31b34149972dacd62afb94d376f35697bf6e
parent5f0bed825e1ebbdf09b1d5897b326975c842a7d0
BUG-7850: YangLibProvider needs to accept null revisions

The API contract indicates that SourceIdentifier.getRevision()
may legally return null. The implementation is currently broken,
so make sure we account for both possibilities.

Also share empty revision object for efficiency, as it is constant.

Change-Id: Iacfe5009eea8d5d9531340da27cbb25d3c6c763f
Signed-off-by: Robert Varga <rovarga@cisco.com>
netconf/yanglib/src/main/java/org/opendaylight/yanglib/impl/YangLibProvider.java