[jira] [Created] (CXF-6998) Manual resolve ApplicationPath from parent classes as well.

2016-08-07 Thread John D. Ament (JIRA)
John D. Ament created CXF-6998:
--

 Summary: Manual resolve ApplicationPath from parent classes as 
well.
 Key: CXF-6998
 URL: https://issues.apache.org/jira/browse/CXF-6998
 Project: CXF
  Issue Type: Improvement
  Components: JAX-RS
Reporter: John D. Ament


The ApplicationPath annotation is not inherited.  As a result, when proxies are 
used (for things like CDI integration), those proxies do not have the 
application path defined.  As a result, the base URI is ignored.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CXF-6998) Manual resolve ApplicationPath from parent classes as well.

2016-08-07 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CXF-6998:
-

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 …

…inherited.

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 
Date:   2016-08-07T22:49:16Z

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




> Manual resolve ApplicationPath from parent classes as well.
> ---
>
> Key: CXF-6998
> URL: https://issues.apache.org/jira/browse/CXF-6998
> Project: CXF
>  Issue Type: Improvement
>  Components: JAX-RS
>Reporter: John D. Ament
>
> The ApplicationPath annotation is not inherited.  As a result, when proxies 
> are used (for things like CDI integration), those proxies do not have the 
> application path defined.  As a result, the base URI is ignored.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (CXF-6999) Undocumented IllegalArgumentException thrown on getAcceptableLanguages

2016-08-07 Thread Neeraj Krishna (JIRA)
Neeraj Krishna created CXF-6999:
---

 Summary: Undocumented IllegalArgumentException thrown on 
getAcceptableLanguages
 Key: CXF-6999
 URL: https://issues.apache.org/jira/browse/CXF-6999
 Project: CXF
  Issue Type: Bug
  Components: JAX-RS
Affects Versions: 3.1.0
Reporter: Neeraj Krishna
Priority: Minor


The following exception stack trace is observed when an user provides incorrect 
language header and getAcceptableLanguages is invoked in the implementation of 
ExceptionMapper

err] java.lang.IllegalArgumentException: Illegal locale value : zh-Hans-VN
2016-08-02T09:48:39.691+0530
[App/2]
err
[err] at org.apache.cxf.jaxrs.utils.HttpUtils.getLocale(HttpUtils.java:281)
2016-08-02T09:48:39.692+0530
[App/2]
err
[err] at 
org.apache.cxf.jaxrs.utils.ExceptionUtils.convertFaultToResponse(ExceptionUtils.java:86)
2016-08-02T09:48:39.692+0530
[App/2]
err
[err] at 
org.apache.cxf.jaxrs.impl.tl.ThreadLocalHttpHeaders.getAcceptableLanguages(ThreadLocalHttpHeaders.java:57)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CXF-6998) Manual resolve ApplicationPath from parent classes as well.

2016-08-07 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CXF-6998:
-

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?


> Manual resolve ApplicationPath from parent classes as well.
> ---
>
> Key: CXF-6998
> URL: https://issues.apache.org/jira/browse/CXF-6998
> Project: CXF
>  Issue Type: Improvement
>  Components: JAX-RS
>Reporter: John D. Ament
>
> The ApplicationPath annotation is not inherited.  As a result, when proxies 
> are used (for things like CDI integration), those proxies do not have the 
> application path defined.  As a result, the base URI is ignored.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)