Description
CXF seems to select an incompatible ExceptionMapper when using class hierarchies.
More precisely, if I define an abstract exception class like following:
@Provider public abstract class AbstractExceptionMapper<E extends Throwable> implements ExceptionMapper<E> { ...
Then I define a concrete one for IllegalArgumentExceptions:
public class IllegalArgumentExceptionMapper extends AbstractExceptionMapper<IllegalArgumentException> { ...
IllegalArgumentExceptionMapper will then be selected even for RuntimeException subtypes unrelated to IllegalArgumentExceptions.
See minimal project showing the problem here
Similar (if not same) problem seems to have been reported via CXF-6635, but I do see this with 3.1.11 and 3.1.12.
Thx!
Attachments
Issue Links
- relates to
-
CXF-6635 Wrong ExceptionMapper Chosen When a Hierarchy is Used
- Closed
-
CXF-5348 Exception mappers implementing ExceptionMapper through an abstract class are not mapped to the declared exception
- Closed
-
CXF-6067 ProviderFactory fails to analyze generic types correctly with some class hierachies
- Closed