[YANGTOOLS-1017] Cleanup Codec/Serializer/Deserializer contracts Created: 24/Aug/19  Updated: 10/Apr/22  Resolved: 03/Sep/19

Status: Resolved
Project: yangtools
Component/s: None
Affects Version/s: None
Fix Version/s: 4.0.0

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


 Description   

Current definition of these interfaces is rather problematic:

  • it does not enforce nullness
  • there is no definition of what happens on illegal input
  • there is no provision for throwing checked exceptions

Updated the definition of Codec, so that it takes an Exception type to be thrown from serialize/deserialize. Also add a specialization for unchecked expecptions and a concrete specialization for IllegalArgumentException – which is effectively what we are doing now.


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