You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2020/04/03 08:03:22 UTC
[camel] branch master updated: CAMEL-14837: rest-dsl remove not
needed parameter during creating rest producer to avoid reflection
setProperty fallback
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new 1836e15 CAMEL-14837: rest-dsl remove not needed parameter during creating rest producer to avoid reflection setProperty fallback
1836e15 is described below
commit 1836e1538341568c07e9c752983c68db1b661020
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri Apr 3 09:10:22 2020 +0200
CAMEL-14837: rest-dsl remove not needed parameter during creating rest producer to avoid reflection setProperty fallback
---
.../main/java/org/apache/camel/component/rest/RestEndpoint.java | 2 --
.../component/undertow/rest/RestUndertowProducerGetPojoTest.java | 9 ++++++---
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/components/camel-rest/src/main/java/org/apache/camel/component/rest/RestEndpoint.java b/components/camel-rest/src/main/java/org/apache/camel/component/rest/RestEndpoint.java
index 3506c14..0dfbe67 100644
--- a/components/camel-rest/src/main/java/org/apache/camel/component/rest/RestEndpoint.java
+++ b/components/camel-rest/src/main/java/org/apache/camel/component/rest/RestEndpoint.java
@@ -390,8 +390,6 @@ public class RestEndpoint extends DefaultEndpoint {
}
}
- parameters.put("producerComponentName", pname);
-
// lookup in registry
if (factory == null) {
Set<RestProducerFactory> factories = getCamelContext().getRegistry().findByType(RestProducerFactory.class);
diff --git a/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/rest/RestUndertowProducerGetPojoTest.java b/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/rest/RestUndertowProducerGetPojoTest.java
index 61681d1..55b589f 100644
--- a/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/rest/RestUndertowProducerGetPojoTest.java
+++ b/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/rest/RestUndertowProducerGetPojoTest.java
@@ -26,6 +26,11 @@ import org.junit.Test;
public class RestUndertowProducerGetPojoTest extends BaseUndertowTest {
+ @Override
+ protected boolean useJmx() {
+ return false;
+ }
+
@Test
public void testUndertowGetPojoRequest() throws Exception {
// should not use reflection when using rest binding in the rest producer
@@ -43,9 +48,7 @@ public class RestUndertowProducerGetPojoTest extends BaseUndertowTest {
assertEquals("EN", pojo.getIso());
assertEquals("England", pojo.getCountry());
- // TODO: Should be 0, but there are elsewhere things being reflected
- // assertEquals(0, bi.getInvokedCounter());
- assertEquals(1, bi.getInvokedCounter());
+ assertEquals(0, bi.getInvokedCounter());
}
@Override