Before 2.20, missing value for `@JacksonInject` is indicated by one of: * `InvalidDefinitionException` if no injectable values configured * `IllegalArgumentException` if no matching value is found form configured ones With fix for #3072 things are being improved (see #5131) but exception types remain as above. Neither is right: 1. `IllegalArgumentException` is highly unexpected, not being a `JacksonException` (of `JsonMappingException` subtype) (#5131 will change this) 2. `InvalidDefinitionException` is incorrect since it is not (necessarily) a bad class definition but more likely mismatch between values So to correctly indicate actual reason, let's create something like `MissingInjectValueException` to indicate exact nature of failure.
Before 2.20, missing value for
@JacksonInjectis indicated by one of:InvalidDefinitionExceptionif no injectable values configuredIllegalArgumentExceptionif 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:
IllegalArgumentExceptionis highly unexpected, not being aJacksonException(ofJsonMappingExceptionsubtype) ( Part of databind#3072: Make @JacksonInject not fail when there's no corresponding value #5131 will change this)InvalidDefinitionExceptionis 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
MissingInjectValueExceptionto indicate exact nature of failure.