Validate augmentation binding class 22/73322/1
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 13 Jun 2018 14:34:39 +0000 (16:34 +0200)
committerRobert Varga <nite@hq.sk>
Thu, 21 Jun 2018 17:05:13 +0000 (17:05 +0000)
commitc6eafa669ace93c8f441494b26ff63331991d608
tree4fd8ebef14089b74a44d5e30de5a7cf63dbc3fa6
parent528f05b46e2d1064cc41ed068caab5b69de9627f
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>
(cherry picked from commit 4225a73eff1f9ee46498722e4d247a0d0aca1ed4)
binding/mdsal-binding-dom-codec/src/main/java/org/opendaylight/mdsal/binding/dom/codec/impl/LazyDataObject.java