Details
-
Bug
-
Status: Closed
-
Trivial
-
Resolution: Fixed
-
proton-j-0.33.3
-
None
Description
When trying to encode an object directly that the codec has no known encoding for, or similarly for a list entry of unknown type, an IllegalArgumentException is thrown to indicate the issue that no encoding is known. If however the unknown element type is the key or value of a map entry being encoded then a NullPointerException occurs instead, making the issue unclear. A similar IllegalArgumentException should instead be thrown in these cases also to make the application issue clearer.