You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by johnament <gi...@git.apache.org> on 2016/08/07 22:50:48 UTC

[GitHub] cxf pull request #154: [CXF-6998] Search for ApplicationPath in super classe...

GitHub user johnament opened a pull request:

    https://github.com/apache/cxf/pull/154

    [CXF-6998] Search for ApplicationPath in super classes since its not \u2026

    \u2026inherited.
    
    See also: https://java.net/jira/browse/JAX_RS_SPEC-534

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/johnament/cxf CXF-6998

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cxf/pull/154.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #154
    
----
commit 2d662a99b2988d7ff1b553d62a0b52b35ac48f84
Author: John D. Ament <jo...@apache.org>
Date:   2016-08-07T22:49:16Z

    [CXF-6998] Search for ApplicationPath in super classes since its not inherited.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cxf issue #154: [CXF-6998] Search for ApplicationPath in super classes since...

Posted by reta <gi...@git.apache.org>.
Github user reta commented on the issue:

    https://github.com/apache/cxf/pull/154
  
    \U0001f44d , sounds good to me, thanks @sberyozkin and @johnament !


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cxf issue #154: [CXF-6998] Search for ApplicationPath in super classes since...

Posted by sberyozkin <gi...@git.apache.org>.
Github user sberyozkin commented on the issue:

    https://github.com/apache/cxf/pull/154
  
    Hi Andriy
    
    That spec statement is many years old, coming form 1.1 or earlier, before ApplicationPath was introduced (AFAIK) thus one may say well that statement does not apply to ApplicationPath as it is really about the resource classes and methods. 
    
    (FYI, CXF checks class/interface level Path itself and never had any issues with various TCKs.)
     
    I'd say it should def be valid to have a custom Application extending another custom Application with ApplicationPath. So IMHO the patch is safe enough :-)
    
    Sergey


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cxf pull request #154: [CXF-6998] Search for ApplicationPath in super classe...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/cxf/pull/154


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cxf pull request #154: [CXF-6998] Search for ApplicationPath in super classe...

Posted by reta <gi...@git.apache.org>.
Github user reta commented on a diff in the pull request:

    https://github.com/apache/cxf/pull/154#discussion_r73816714
  
    --- Diff: rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java ---
    @@ -939,21 +939,29 @@ public static boolean isValidResourceClass(Class<?> c) {
             }
             return true;
         }
    -    
    +
    +    public static ApplicationPath locateApplicationPath(Class<?> appClass) {
    +        ApplicationPath appPath = appClass.getAnnotation(ApplicationPath.class);
    +        if (appPath == null && appClass.getSuperclass() != Application.class) {
    --- End diff --
    
    I may be wrong here, but solving issue proxies we are going against JAX-RS 2.0 spec:
    ```
    3.6 Annotation Inheritance
    ... Note that inheritance of class or interface annotations is not supported. ...
    ```
    
    Does it make sense to limit the scope by identifying the particular use case that CXF dials with proxy (may be using Proxy.isProxyClass or alike) and only then fall back to super class hierarchy?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---