Add an explicit guard for root presence 93/19693/3
authorRobert Varga <rovarga@cisco.com>
Wed, 6 May 2015 09:57:35 +0000 (11:57 +0200)
committerRobert Varga <nite@hq.sk>
Wed, 13 May 2015 09:47:03 +0000 (09:47 +0000)
commit5ef3b21212ef72fea2602adb8ca0719ffe4092e5
tree837d9d651d0ebd52161cc5178e228d3e5d4ae7aa
parentc5c1c745440f660bfdc3c3efef25cf750a6ebc39
Add an explicit guard for root presence

A modification could potentially remove the root node, which would
trigger a failure in Optional.get(). Add an explicit check to provide
better diagnostic in that case.

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