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 2019/12/10 12:04:24 UTC
[camel] branch master updated: CAMEL-14284: Configuring endpoint
should set properties on endpoint and not configuration object
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 f1ac2da CAMEL-14284: Configuring endpoint should set properties on endpoint and not configuration object
f1ac2da is described below
commit f1ac2da08224eed1601c07fe41210ef6aefe2373
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue Dec 10 13:04:00 2019 +0100
CAMEL-14284: Configuring endpoint should set properties on endpoint and not configuration object
---
.../main/java/org/apache/camel/component/atmos/AtmosComponent.java | 6 +++---
.../main/java/org/apache/camel/component/atmos/AtmosEndpoint.java | 1 +
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/AtmosComponent.java b/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/AtmosComponent.java
index 455caf0..e8084c9 100644
--- a/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/AtmosComponent.java
+++ b/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/AtmosComponent.java
@@ -79,9 +79,9 @@ public class AtmosComponent extends DefaultComponent {
AtmosConfigurationValidator.validate(configuration);
// and then override from parameters
- setProperties(configuration, parameters);
-
- return new AtmosEndpoint(uri, this, configuration);
+ AtmosEndpoint endpoint = new AtmosEndpoint(uri, this, configuration);
+ setProperties(endpoint, parameters);
+ return endpoint;
}
public String getFullTokenId() {
diff --git a/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/AtmosEndpoint.java b/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/AtmosEndpoint.java
index c0b7a32..a9c0e1c 100644
--- a/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/AtmosEndpoint.java
+++ b/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/AtmosEndpoint.java
@@ -95,6 +95,7 @@ public class AtmosEndpoint extends DefaultEndpoint {
if (this.configuration.getOperation() == AtmosOperation.get) {
consumer = new AtmosScheduledPollGetConsumer(this, processor, configuration);
consumer.setDelay(POLL_CONSUMER_DELAY);
+ configureConsumer(consumer);
return consumer;
} else {
throw new AtmosException("operation specified is not valid for consumer!");