cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stan Jonsson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-5534) ProviderFactory returns incorrect ExceptionMapper when no exact match is registered
Date Fri, 31 Jan 2014 14:46:12 GMT

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

Stan Jonsson commented on CXF-5534:
-----------------------------------

Sergey, when will 2.7.9 be released?  I don't see it on http://cxf.apache.org/download.html
yet.

> ProviderFactory returns incorrect ExceptionMapper when no exact match is registered
> -----------------------------------------------------------------------------------
>
>                 Key: CXF-5534
>                 URL: https://issues.apache.org/jira/browse/CXF-5534
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.7.8
>            Reporter: Hans Weisheimer
>            Priority: Minor
>             Fix For: 2.7.9
>
>         Attachments: ProviderFactoryExceptionMapperTest.java
>
>
> The JAX-RS 1.1 spec says:
> When choosing an exception mapping provider to map an exception, an implementation MUST
use the provider whose generic type is the nearest superclass of the exception.
> In 2.7.0, this was working per the spec.  In 2.7.8 (likely starting with 2.7.6, but not
tested), the FIRST ExceptionMapper provider is returned when there is no exact match.  This
usually results in a ClassCastException.
> In the attached test, a NullPointerException should map to the registered ExceptionMapper<RuntimeException>
provider, but it does not.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message