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/03 08:44:00 UTC
[jira] [Commented] (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:comment-tabpanel&focusedCommentId=17338240#comment-17338240 ]
Richard Zowalla commented on TOMEE-2994:
----------------------------------------
Imho this was resolved with [https://github.com/apache/tomee/commit/4cec6322c0c066ebc0515b0833989f9af264280f]
Feel free to re-open, if it is not fixed.
> 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
>
>
> 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)