cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jocelyn Lepage (JIRA)" <>
Subject [jira] [Created] (CXF-7473) ExceptionMapper class hierarchies: incompatible ExceptionMapper selected
Date Mon, 14 Aug 2017 14:48:00 GMT
Jocelyn Lepage created CXF-7473:

             Summary: ExceptionMapper class hierarchies: incompatible ExceptionMapper selected
                 Key: CXF-7473
             Project: CXF
          Issue Type: Bug
          Components: JAX-RS
    Affects Versions: 3.1.12, 3.1.11
            Reporter: Jocelyn Lepage

CXF seems to select an incompatible ExceptionMapper when using class hierarchies.

More precisely, if I define an abstract exception class like following:

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.


This message was sent by Atlassian JIRA

View raw message