Validate augmentation binding class 61/72961/6
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 13 Jun 2018 14:34:39 +0000 (16:34 +0200)
committerRobert Varga <nite@hq.sk>
Tue, 19 Jun 2018 07:23:24 +0000 (07:23 +0000)
commit4225a73eff1f9ee46498722e4d247a0d0aca1ed4
treeff2e68554a4d8cda1e37f80002cd0a8b01891e87
parent7d208ad0139c820dd6c11329f73d6d11b1055bda
Validate augmentation binding class

LazyDataObject's DataObject.augmentation(Class) implementation
needs to re-validate if the augmentation we are about to decode
matches user-requested augmentation.

This is needed to ensure that we do not return shape-equivalent
augmentation, such as when the same augmentation is applied to
multiple instantiations of the same grouping. In such a case
type-safety indicates that the grouping can have either of the
augmentations, yet in reality its validity depends on
instantiation.

JIRA: MDSAL-328
Change-Id: I57dd70ddead65fc7f61c72b58da4ef6d26e739f8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
binding/mdsal-binding-dom-codec/src/main/java/org/opendaylight/mdsal/binding/dom/codec/impl/LazyDataObject.java