[
https://issues.apache.org/jira/browse/CXF-6854?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15219858#comment-15219858
]
Jim Ma commented on CXF-6854:
-----------------------------
You are right, Sergey. This is something should not be supported from spec.
I'll close this and sorry for the wrong alarm.
> Application subclass can't be injected into an application lass field
> ---------------------------------------------------------------------
>
> Key: CXF-6854
> URL: https://issues.apache.org/jira/browse/CXF-6854
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 3.1.6, 3.0.9
> Reporter: Jim Ma
> Assignee: Jim Ma
> Fix For: 3.0.10, 3.1.7, 3.2.0
>
> Attachments: injectionUtil.diff
>
>
> public class MyApplication extends Application {
> @Context
> Application application;
> @Context
> UriInfo info;
> @Context
> Request request;
> @Context
> HttpHeaders headers;
> public java.util.Set<java.lang.Class<?>> getClasses() {
> Set<Class<?>> resources = new HashSet<Class<?>>();
> resources.add(Resource.class);
> return resources;
> }
> The application field is expected to be injected with value of MyApplication
> object(this), not a null value after this application is started.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)