Fix NPE in YangTextSchemaSourceSerializationProxy#getRepresentation
authorJakub Morvay <jmorvay@cisco.com>
Tue, 28 Feb 2017 07:28:01 +0000 (08:28 +0100)
committerTom Pantelis <tpanteli@brocade.com>
Tue, 28 Feb 2017 11:52:53 +0000 (11:52 +0000)
commit3bcc77c9aef84fc8cb96434ca17fded0e669ccc9
tree34804a7bd7248a42b3c89714d5c0b5a4504837e4
parent2612b036ca7b7c4120ca922d5d8c20b03c379da6
Fix NPE in YangTextSchemaSourceSerializationProxy#getRepresentation

According to its general contract, when revision is not found,
SourceIdentifier#getRevision method returns null. Wrap revision in
Optional#fromNullable to avoid possible NPE.

Change-Id: I78f544374f179c9486cc8dd09cbcf1eea379e1e9
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
java/org/opendaylight/controller/cluster/schema/provider/impl/YangTextSchemaSourceSerializationProxy.java