You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Richard Zowalla (Jira)" <ji...@apache.org> on 2021/05/12 14:37:00 UTC

[jira] [Updated] (TOMEE-2994) JAX-RS Provider construction favors constructor with the most args

     [ https://issues.apache.org/jira/browse/TOMEE-2994?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard Zowalla updated TOMEE-2994:
-----------------------------------
    Fix Version/s: 8.0.8

> JAX-RS Provider construction favors constructor with the most args
> ------------------------------------------------------------------
>
>                 Key: TOMEE-2994
>                 URL: https://issues.apache.org/jira/browse/TOMEE-2994
>             Project: TomEE
>          Issue Type: Improvement
>          Components: TomEE Core Server
>            Reporter: David Blevins
>            Assignee: David Blevins
>            Priority: Major
>             Fix For: 8.0.7, 8.0.8
>
>
> When constructing JAX-RS Providers, we should favor the constructor with the most arguments.  For example, in the following, the 4 arg constructor should be selected.
> {code:java}
> public StringReader(@Context HttpHeaders headers, @Context UriInfo info,
>  @Context Application application, @Context Request request) {
>  super();
>  this.headers = headers;
>  this.info = info;
>  this.application = application;
>  this.request = request;
> }
> public StringReader(@Context HttpHeaders headers, @Context UriInfo info,
>  @Context Application application) {
>  super();
>  this.headers = headers;
>  this.info = info;
>  this.application = application;
> }
> public StringReader(@Context HttpHeaders headers, @Context UriInfo info) {
>  super();
>  this.headers = headers;
>  this.info = info;
> }
> public StringReader(@Context HttpHeaders headers) {
>  super();
>  this.headers = headers;
> }{code}
> This is tested in the Jakarta EE TCK in test 
> {code:java}
> com/sun/ts/tests/jaxrs/spec/provider/visibility{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)