Fix NPE in YangTextSchemaSourceSerializationProxy#getRepresentation 37/52337/4
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)
commit40723a37cc98de6c7dc396ca2558f7ef51e7337a
tree210592e583bf7290d73123cb2758c867aceca6ab
parent271e66acd1391895c006806dfe76ae6d09017a83
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>
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/schema/provider/impl/YangTextSchemaSourceSerializationProxy.java

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.