Add an explicit guard to child modifications 92/19692/3
authorRobert Varga <rovarga@cisco.com>
Wed, 6 May 2015 09:45:46 +0000 (11:45 +0200)
committerTony Tkacik <ttkacik@cisco.com>
Wed, 13 May 2015 09:28:22 +0000 (09:28 +0000)
commitc5c1c745440f660bfdc3c3efef25cf750a6ebc39
tree838f8aa3aa491e673a2605bb99c19ebe38bc12dd
parentc49971ebea9f449efb529ae54cd9b8f8a996d111
Add an explicit guard to child modifications

If we attempt to apply a merge operation to a non-existent child, we may
end up throwing an IllegalStateException stemming from unchecked
Optional.get().

Add an explicit argument check for child node presence to provide better
diagnostics.

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