Guard against null data in AbstractLeafCandidateNode 45/20845/2
authorRobert Varga <rovarga@cisco.com>
Wed, 20 May 2015 19:56:22 +0000 (21:56 +0200)
committerGerrit Code Review <gerrit@opendaylight.org>
Thu, 21 May 2015 17:55:06 +0000 (17:55 +0000)
commit540b47bdefb25b8edb8481499efcd51d402bd57c
tree6a82e9bd603f17e8a1ac2b483c34bec051b4c19c
parent1f29c046d27af10f5228396a94213ebc59aa0b9b
Guard against null data in AbstractLeafCandidateNode

An instance of this class is defunct if data is ever null, as accessors
will throw a NPE from Optional.of(). Make sure data passed down is never
null, catching any possible offenders.

This transitively fixes the transformation functions, as they will throw
NPE when they get a null input, as per Function API contract.

Change-Id: I8851e3c68dc9aa5abab4874f019fd214b20c0415
Signed-off-by: Robert Varga <rovarga@cisco.com>
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/tree/AbstractLeafCandidateNode.java