You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2019/12/10 14:30:52 UTC

[camel] branch master updated: CAMEL-14284: Configuring endpoint should set properties on endpoint and not configuration object - Weather component

This is an automated email from the ASF dual-hosted git repository.

acosentino 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 f13ad88  CAMEL-14284: Configuring endpoint should set properties on endpoint and not configuration object - Weather component
f13ad88 is described below

commit f13ad886f44b41f5d012113b77fd1964e8303497
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Dec 10 15:29:54 2019 +0100

    CAMEL-14284: Configuring endpoint should set properties on endpoint and not configuration object - Weather component
---
 .../java/org/apache/camel/component/weather/WeatherComponent.java     | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/components/camel-weather/src/main/java/org/apache/camel/component/weather/WeatherComponent.java b/components/camel-weather/src/main/java/org/apache/camel/component/weather/WeatherComponent.java
index 7d4d503..04b3fc2 100644
--- a/components/camel-weather/src/main/java/org/apache/camel/component/weather/WeatherComponent.java
+++ b/components/camel-weather/src/main/java/org/apache/camel/component/weather/WeatherComponent.java
@@ -49,13 +49,11 @@ public class WeatherComponent extends DefaultComponent {
     protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
         WeatherConfiguration configuration = new WeatherConfiguration(this);
 
-        // and then override from parameters
-        setProperties(configuration, parameters);
-
         httpClient = createHttpClient(configuration);
         geolocationAccessKey = configuration.getGeolocationAccessKey();
         geolocationRequestHostIP = configuration.getGeolocationRequestHostIP();
         WeatherEndpoint endpoint = new WeatherEndpoint(uri, this, configuration);
+        setProperties(endpoint, parameters);
         return endpoint;
     }