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 f428296 camel-core - Avoid using reflection when setting properties.
f428296 is described below
commit f4282960bda946540bec0597b0830158d9f68bd3
Author: Claus Ibsen <[email protected]>
AuthorDate: Thu Aug 6 16:25:53 2020 +0200
camel-core - Avoid using reflection when setting properties.
---
.../main/java/org/apache/camel/component/cron/CronComponent.java | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git
a/components/camel-cron/src/main/java/org/apache/camel/component/cron/CronComponent.java
b/components/camel-cron/src/main/java/org/apache/camel/component/cron/CronComponent.java
index c48356c..ae67825 100644
---
a/components/camel-cron/src/main/java/org/apache/camel/component/cron/CronComponent.java
+++
b/components/camel-cron/src/main/java/org/apache/camel/component/cron/CronComponent.java
@@ -45,16 +45,13 @@ public class CronComponent extends DefaultComponent {
public Endpoint createEndpoint(String uri, String remaining, Map<String,
Object> properties) throws Exception {
CamelCronConfiguration configuration = new CamelCronConfiguration();
configuration.setName(remaining);
- setProperties(configuration, properties);
- validate(configuration);
Endpoint delegate = this.service.createEndpoint(configuration);
CronEndpoint cronEndpoint = new CronEndpoint(uri, this, delegate,
configuration);
+ setProperties(cronEndpoint, properties);
- if (properties.size() > 0) {
- // Additional endpoint properties present
- setProperties(cronEndpoint, properties);
- }
+ // validate after options has been set
+ validate(configuration);
return cronEndpoint;
}