[jira] [Commented] (CXF-7670) synthetic methods: equal candidates for handling the current request

2018-03-22 Thread Andriy Redko (JIRA)

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

Andriy Redko commented on CXF-7670:
---

Thanks [~ilgrosso], yes, closing it now,

> synthetic methods: equal candidates for handling the current request
> 
>
> Key: CXF-7670
> URL: https://issues.apache.org/jira/browse/CXF-7670
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.2.1, 3.2.2
> Environment: I have noticed this with kotlin projects.
>Reporter: Laszlo Hornyak
>Priority: Major
> Fix For: 3.2.4
>
>
> When discovering JAX-RS annotations, CXF does not filter out synthetic 
> methods. If the compiler have created any synthetic methods out of the 
> annotated methods, it will store them as JAX-RS resource methods with 
> actually the same annotated method.
> After startup, CXF will log each invocation on the duplicated resource 
> methods with a warning, which reduces performance, and generates quite some 
> log.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CXF-7670) synthetic methods: equal candidates for handling the current request

2018-03-22 Thread JIRA

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

Francesco Chicchiriccò commented on CXF-7670:
-

[~reta] I've just checked with 3.2.4-SNAPSHOT artifacts containing the 
[fix|https://github.com/apache/cxf/commit/60e02bacfcb09ff105d083ac3f49d0cd03c21494]
 by [~dkulp] and I can gladly confirm all is fine with Syncope - that's why 
I've [committed 
there|https://github.com/apache/syncope/commit/9b1c26c79ccdff65f5b9df0aeba09e488b077235]
 the upgrade to 3.2.4-SNAPSHOT with removal of local {{ResourceUtils}}.
Thanks!

Shall we close this issue now, then?

> synthetic methods: equal candidates for handling the current request
> 
>
> Key: CXF-7670
> URL: https://issues.apache.org/jira/browse/CXF-7670
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.2.1, 3.2.2
> Environment: I have noticed this with kotlin projects.
>Reporter: Laszlo Hornyak
>Priority: Major
> Fix For: 3.2.4
>
>
> When discovering JAX-RS annotations, CXF does not filter out synthetic 
> methods. If the compiler have created any synthetic methods out of the 
> annotated methods, it will store them as JAX-RS resource methods with 
> actually the same annotated method.
> After startup, CXF will log each invocation on the duplicated resource 
> methods with a warning, which reduces performance, and generates quite some 
> log.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CXF-7670) synthetic methods: equal candidates for handling the current request

2018-03-21 Thread Andriy Redko (JIRA)

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

Andriy Redko commented on CXF-7670:
---

[~ilgrosso] I just saw that [~dkulp] committed a fix (thanks!), could you 
please check if your issue has gone? I will be committing test case shortly. 
Thank you.

> synthetic methods: equal candidates for handling the current request
> 
>
> Key: CXF-7670
> URL: https://issues.apache.org/jira/browse/CXF-7670
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.2.1, 3.2.2
> Environment: I have noticed this with kotlin projects.
>Reporter: Laszlo Hornyak
>Priority: Major
> Fix For: 3.2.4
>
>
> When discovering JAX-RS annotations, CXF does not filter out synthetic 
> methods. If the compiler have created any synthetic methods out of the 
> annotated methods, it will store them as JAX-RS resource methods with 
> actually the same annotated method.
> After startup, CXF will log each invocation on the duplicated resource 
> methods with a warning, which reduces performance, and generates quite some 
> log.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CXF-7670) synthetic methods: equal candidates for handling the current request

2018-03-21 Thread JIRA

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

Francesco Chicchiriccò commented on CXF-7670:
-

The PR #388 introduced some regression, as described in the linked ML thread.

> synthetic methods: equal candidates for handling the current request
> 
>
> Key: CXF-7670
> URL: https://issues.apache.org/jira/browse/CXF-7670
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.2.1, 3.2.2
> Environment: I have noticed this with kotlin projects.
>Reporter: Laszlo Hornyak
>Priority: Major
>
> When discovering JAX-RS annotations, CXF does not filter out synthetic 
> methods. If the compiler have created any synthetic methods out of the 
> annotated methods, it will store them as JAX-RS resource methods with 
> actually the same annotated method.
> After startup, CXF will log each invocation on the duplicated resource 
> methods with a warning, which reduces performance, and generates quite some 
> log.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CXF-7670) synthetic methods: equal candidates for handling the current request

2018-03-16 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CXF-7670:
-

andymc12 closed pull request #388: [CXF-7670] create a single ClassResourceInfo 
per class + annotated method
URL: https://github.com/apache/cxf/pull/388
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/core/src/main/java/org/apache/cxf/helpers/DOMUtils.java 
b/core/src/main/java/org/apache/cxf/helpers/DOMUtils.java
index a8da8197fdb..5b793673799 100644
--- a/core/src/main/java/org/apache/cxf/helpers/DOMUtils.java
+++ b/core/src/main/java/org/apache/cxf/helpers/DOMUtils.java
@@ -99,6 +99,7 @@ private static DocumentBuilder getDocumentBuilder() throws 
ParserConfigurationEx
 DocumentBuilderFactory f = DocumentBuilderFactory.newInstance();
 f.setNamespaceAware(true);
 f.setFeature(javax.xml.XMLConstants.FEATURE_SECURE_PROCESSING, 
true);
+
f.setFeature("http://apache.org/xml/features/disallow-doctype-decl;, true);
 return f.newDocumentBuilder();
 }
 DocumentBuilder factory = DOCUMENT_BUILDERS.get(loader);
@@ -106,6 +107,7 @@ private static DocumentBuilder getDocumentBuilder() throws 
ParserConfigurationEx
 DocumentBuilderFactory f2 = DocumentBuilderFactory.newInstance();
 f2.setNamespaceAware(true);
 f2.setFeature(javax.xml.XMLConstants.FEATURE_SECURE_PROCESSING, 
true);
+
f2.setFeature("http://apache.org/xml/features/disallow-doctype-decl;, true);
 factory = f2.newDocumentBuilder();
 DOCUMENT_BUILDERS.put(loader, factory);
 }
diff --git 
a/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/XMLTypeCreator.java
 
b/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/XMLTypeCreator.java
index f9d1ff51819..a9de4123ac7 100644
--- 
a/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/XMLTypeCreator.java
+++ 
b/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/XMLTypeCreator.java
@@ -115,6 +115,11 @@
 static {
 AEGIS_DOCUMENT_BUILDER_FACTORY = DocumentBuilderFactory.newInstance();
 AEGIS_DOCUMENT_BUILDER_FACTORY.setNamespaceAware(true);
+try {
+
AEGIS_DOCUMENT_BUILDER_FACTORY.setFeature(javax.xml.XMLConstants.FEATURE_SECURE_PROCESSING,
 true);
+} catch (javax.xml.parsers.ParserConfigurationException ex) {
+// ignore
+}
 
 String path = "/META-INF/cxf/aegis.xsd";
 InputStream is = XMLTypeCreator.class.getResourceAsStream(path);
diff --git 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
index 8f4316c489e..0f044e85d3b 100644
--- 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
+++ 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
@@ -311,44 +311,55 @@ private static void 
evaluateResourceClass(ClassResourceInfo cri, boolean enableS
 MethodDispatcher md = new MethodDispatcher();
 Class serviceClass = cri.getServiceClass();
 
+final Set annotatedMethods = new HashSet<>();
+
 for (Method m : serviceClass.getMethods()) {
 
 Method annotatedMethod = 
AnnotationUtils.getAnnotatedMethod(serviceClass, m);
 
-String httpMethod = 
AnnotationUtils.getHttpMethodValue(annotatedMethod);
-Path path = AnnotationUtils.getMethodAnnotation(annotatedMethod, 
Path.class);
+if (!annotatedMethods.contains(annotatedMethod)) {
+evaluateResourceMethod(cri, enableStatic, md, m, 
annotatedMethod);
+annotatedMethods.add(annotatedMethod);
+}
 
-if (httpMethod != null || path != null) {
-if (!checkAsyncResponse(annotatedMethod)) {
-continue;
-}
+}
+cri.setMethodDispatcher(md);
+}
+
+private static void evaluateResourceMethod(ClassResourceInfo cri, boolean 
enableStatic, MethodDispatcher md,
+   Method m, Method 
annotatedMethod) {
+String httpMethod = 
AnnotationUtils.getHttpMethodValue(annotatedMethod);
+Path path = AnnotationUtils.getMethodAnnotation(annotatedMethod, 
Path.class);
+
+if (httpMethod != null || path != null) {
+if (!checkAsyncResponse(annotatedMethod)) {
+return;
+}
 
-md.bind(createOperationInfo(m, annotatedMethod, cri, path, 
httpMethod), m);
-if (httpMethod == null) {

[jira] [Commented] (CXF-7670) synthetic methods: equal candidates for handling the current request

2018-03-13 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CXF-7670:
-

K0zka commented on issue #388: [CXF-7670] create a single ClassResourceInfo per 
class + annotated method
URL: https://github.com/apache/cxf/pull/388#issuecomment-372787363
 
 
   .


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> synthetic methods: equal candidates for handling the current request
> 
>
> Key: CXF-7670
> URL: https://issues.apache.org/jira/browse/CXF-7670
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.2.1, 3.2.2
> Environment: I have noticed this with kotlin projects.
>Reporter: Laszlo Hornyak
>Priority: Major
>
> When discovering JAX-RS annotations, CXF does not filter out synthetic 
> methods. If the compiler have created any synthetic methods out of the 
> annotated methods, it will store them as JAX-RS resource methods with 
> actually the same annotated method.
> After startup, CXF will log each invocation on the duplicated resource 
> methods with a warning, which reduces performance, and generates quite some 
> log.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CXF-7670) synthetic methods: equal candidates for handling the current request

2018-03-07 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CXF-7670:
-

K0zka opened a new pull request #388: [CXF-7670] create a single 
ClassResourceInfo per class + annotated method
URL: https://github.com/apache/cxf/pull/388
 
 
   In each resource class, an annotated method should be registered only once.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> synthetic methods: equal candidates for handling the current request
> 
>
> Key: CXF-7670
> URL: https://issues.apache.org/jira/browse/CXF-7670
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.2.1, 3.2.2
> Environment: I have noticed this with kotlin projects.
>Reporter: Laszlo Hornyak
>Priority: Major
>
> When discovering JAX-RS annotations, CXF does not filter out synthetic 
> methods. If the compiler have created any synthetic methods out of the 
> annotated methods, it will store them as JAX-RS resource methods with 
> actually the same annotated method.
> After startup, CXF will log each invocation on the duplicated resource 
> methods with a warning, which reduces performance, and generates quite some 
> log.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)