-
-
Notifications
You must be signed in to change notification settings - Fork 83
Description
Currently jackson's json provider package (com.fasterxml.jackson.jaxrs.json) includes ExceptionMappers for JsonMappingException and JsonParseException.
This may cause unpredictable behaviour if the application also has an ExceptionMapper for either JsonMappingException or JsonParseException and includes in the registration the com.fasterxml.jackson.jaxrs.json package (where the Json and Jaxb providers are located). The result is that depending on which class gets registered first it will be the one used by jersey. From what I can gather the order by which they get picked up is random, sometimes the app's mappers get used, other times it's the jackson ones.
I understand the reasoning behind the inclusion of these mappers, but I think their registration as provider should at least be configurable (maybe as a feature?). It could also be a good idea to put them in another package to avoid people registering the com.fasterxml.jackson.jaxrs.json package and "accidentally" also registering the mappers.