[MDSAL-704] Do not use IllegalArgumentCodec Created: 28/Oct/21  Updated: 10/Jun/22  Resolved: 10/Jun/22

Status: Resolved
Project: mdsal
Component/s: Binding runtime
Affects Version/s: None
Fix Version/s: 10.0.0

Type: Task Priority: Medium
Reporter: Robert Varga Assignee: Robert Varga
Resolution: Done Votes: 0
Labels: pt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Link: Remove Codec concepts

 Description   

mdsal-binding-dom-codec is using yangtools.concepts.IllegalArgumentCodec, which is going away. The use here is not conforming to the @NonNull requirement anyway.

Add a dom-codec-local replacement with exactly the semantics we need, probably with a checked exception being thrown, and use that instead of IllegalArgumentCodec.



 Comments   
Comment by Ivan Hrasko [ 10/Nov/21 ]

Do you wish to have a new codec in org.opendaylight.mdsal.binding.dom.codec.api package together with another codec

or should it have its own dom-codec-local package/bundle?

Comment by Robert Varga [ 10/Nov/21 ]

Purely local thing would be best, no sense in proliferating single-use things

Comment by Robert Varga [ 11/Apr/22 ]

So going through the analysis, we can do quite a bit of untangling, as it seem all codecs are null-hostile. The one outlier is InstanceIdentifier, which produces nulls when a YangInstanceIdentifier is not representable. Let's juggle the class hierarchy first, and let's see what possibilities fall out of this.

Comment by Robert Varga [ 14/Apr/22 ]

We have a mdsal-binding-dom-codec-api construct in BindingIdentityCodec, which pretty much follows what we want to do. There is also a counterpart in BindingInstanceIdentifierCodec, hence we should be able to generalize these constructs. Since this is an API change, move implementation to 10.0.0.

Generated at Wed Feb 07 20:10:38 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.