camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [1/4] camel git commit: CAMEL-9273:Added simple string method for adding a comma separated id
Date Wed, 25 May 2016 15:07:11 GMT
Repository: camel
Updated Branches:
  refs/heads/master ced55f778 -> f40d087d4


CAMEL-9273:Added simple string method for adding a comma separated id


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/98390269
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/98390269
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/98390269

Branch: refs/heads/master
Commit: 9839026937257fd2a93635e5775de091585f50be
Parents: 2f3392d
Author: Arno Noordover <arno@noordover.net>
Authored: Wed May 25 15:55:13 2016 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Wed May 25 16:54:34 2016 +0200

----------------------------------------------------------------------
 .../camel/component/weather/WeatherConfiguration.java     | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/98390269/components/camel-weather/src/main/java/org/apache/camel/component/weather/WeatherConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-weather/src/main/java/org/apache/camel/component/weather/WeatherConfiguration.java
b/components/camel-weather/src/main/java/org/apache/camel/component/weather/WeatherConfiguration.java
index 9613c1f..aaff564 100644
--- a/components/camel-weather/src/main/java/org/apache/camel/component/weather/WeatherConfiguration.java
+++ b/components/camel-weather/src/main/java/org/apache/camel/component/weather/WeatherConfiguration.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.weather;
 
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Scanner;
 
@@ -26,6 +27,7 @@ import org.apache.camel.spi.Metadata;
 import org.apache.camel.spi.UriParam;
 import org.apache.camel.spi.UriParams;
 import org.apache.camel.spi.UriPath;
+import org.apache.camel.util.ObjectHelper;
 import org.apache.commons.httpclient.HttpConnectionManager;
 
 import static org.apache.camel.component.weather.WeatherLanguage.en;
@@ -375,10 +377,16 @@ public class WeatherConfiguration {
         }
         ids.add(id);
     }
+
     /**
      * List of id's of city/stations
      */
-    public void setIds(String... ids) {
+    public void setIds(String id, String... ids) {
+        Iterator<?> it = ObjectHelper.createIterator(id);
+        while (it.hasNext()) {
+            String myId = (String) it.next();
+            addId(myId);
+        }
         this.ids = Arrays.asList(ids);
     }
 


Mime
View raw message