Convert users of Optional.get()
Upgraded modernized plugin is flagging callers of Optional.get(). This
is a good opportunity to inspect how exactly we use Optionals.
It turns out we can improve things significantly by taking advantage of
improved interfaces in yang.data.api: using childByArg()/getChildByArg()
we can:
- remove explicit calls to verifyNotNull()
- remove duplicate lookups of nodes
- remove Optional.ifPresent() indirection
Change-Id: If1f898f3e12e730e8084cca9689f94949c53c852
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
fe8217050d67666bb2ffd8d6ee3bdcfd52867d6d)