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

Sergey Beryozkin commented on CXF-6854:
---------------------------------------

Hi Jim

Right, I see, this is a bizarre case. Inject Application instance into itself, 
what does it mean ? The fix seems to be an easy one, but let me ask on the 
experts list - it simply does not make sense IMHO. I know you are seeing a test 
issue - but I wonder if it is something that needs to addressed or not - 
appears to me the RI injection system is a bit too generic.

> 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)

Reply via email to