Clean up DataContainerCodecContext exception handling 27/106127/2
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 22 May 2023 23:13:00 +0000 (01:13 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 22 May 2023 23:17:12 +0000 (01:17 +0200)
commit469a57c3adac4b6ae0df0c6398d926096cca13e2
tree3373ca077370fa350d09952b94437b63d32ceabb
parent7df789056b8d9317bc9369884f654c8ca186a0a0
Clean up DataContainerCodecContext exception handling

We are getting confused between immediate throws and returns. The
exception factory methods should be returning the exception and not
throwing it.

Fix this up and add a SpotBugs annotation so that throws are guarded.
Also mark IncorrectNestingException for evolution. Final improvement
that we now have a completely-static factory method.

Change-Id: I5262c0dbb31d6935f258909828aac5331c70801b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
binding/mdsal-binding-dom-codec-api/src/main/java/org/opendaylight/mdsal/binding/dom/codec/api/IncorrectNestingException.java
binding/mdsal-binding-dom-codec/src/main/java/org/opendaylight/mdsal/binding/dom/codec/impl/DataContainerCodecContext.java