Clean up DataContainerCodecContext exception handling
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 22 May 2023 23:13:00 +0000 (01:13 +0200)
committerAnil Belur <abelur@linuxfoundation.org>
Wed, 19 Jun 2024 00:41:45 +0000 (10:41 +1000)
commit948f7a112e0068f0d43f1ca3fdead95a61c94b0a
treea6d55b8149fffb354939e4c5abc6d041399703e8
parente153d1a4bb337ba03dd5da6129257a7b189b8e4e
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