cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-7473) ExceptionMapper class hierarchies: incompatible ExceptionMapper selected
Date Fri, 08 Sep 2017 15:59:00 GMT

    [ https://issues.apache.org/jira/browse/CXF-7473?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16158837#comment-16158837
] 

Sergey Beryozkin commented on CXF-7473:
---------------------------------------

I'm afraid it requires more time to fix it, the first step is to patch the existing code (for
the next version), and then - throw it away and do a proper code checking the types, bounds,
etc for a new master

> ExceptionMapper class hierarchies: incompatible ExceptionMapper selected
> ------------------------------------------------------------------------
>
>                 Key: CXF-7473
>                 URL: https://issues.apache.org/jira/browse/CXF-7473
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 3.1.11, 3.1.12
>            Reporter: Jocelyn Lepage
>             Fix For: 3.2.1
>
>
> CXF seems to select an incompatible ExceptionMapper when using class hierarchies.
> More precisely, if I define an abstract exception class like following:
> {code:java}
> @Provider
> public abstract class AbstractExceptionMapper<E extends Throwable> implements ExceptionMapper<E>
{
> ...
> {code}
> Then I define a concrete one for IllegalArgumentExceptions:
> {code:java}
> public class IllegalArgumentExceptionMapper extends AbstractExceptionMapper<IllegalArgumentException>
{
> ...
> {code}
> IllegalArgumentExceptionMapper will then be selected even for RuntimeException subtypes
unrelated to IllegalArgumentExceptions.
> See minimal project showing the problem [here|https://github.com/jlepage-appdirect/cxf-exception-mapper-bug]
> 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!



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message