Add new exception type, MissingInjectValueException
, to be used for failed @JacksonInject
#5151
Labels
2.20
Issues planned at 2.20 or later
Before 2.20, missing value for
@JacksonInject
is indicated by one of:InvalidDefinitionException
if no injectable values configuredIllegalArgumentException
if no matching value is found form configured onesWith fix for #3072 things are being improved (see #5131) but exception types remain as above.
Neither is right:
IllegalArgumentException
is highly unexpected, not being aJacksonException
(ofJsonMappingException
subtype) ( Part of databind#3072: Make @JacksonInject not fail when there's no corresponding value #5131 will change this)InvalidDefinitionException
is incorrect since it is not (necessarily) a bad class definition but more likely mismatch between valuesSo to correctly indicate actual reason, let's create something like
MissingInjectValueException
to indicate exact nature of failure.The text was updated successfully, but these errors were encountered: