camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [2/8] camel git commit: Polished
Date Wed, 05 Jul 2017 09:27:00 GMT
Polished


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

Branch: refs/heads/master
Commit: 1abeae7f40613a215411b7d254e96891e9a0ba2e
Parents: 57ee832
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Wed Jul 5 10:49:42 2017 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Wed Jul 5 10:49:42 2017 +0200

----------------------------------------------------------------------
 .../component/twitter/streaming/TwitterStreamingEndpoint.java     | 3 ++-
 .../camel/component/twitter/timeline/TwitterTimelineEndpoint.java | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/1abeae7f/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/streaming/TwitterStreamingEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/streaming/TwitterStreamingEndpoint.java
b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/streaming/TwitterStreamingEndpoint.java
index 76228d8..49370d2 100644
--- a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/streaming/TwitterStreamingEndpoint.java
+++ b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/streaming/TwitterStreamingEndpoint.java
@@ -24,6 +24,7 @@ import org.apache.camel.component.twitter.TwitterConfiguration;
 import org.apache.camel.component.twitter.TwitterHelper;
 import org.apache.camel.component.twitter.consumer.AbstractTwitterConsumerHandler;
 import org.apache.camel.component.twitter.data.StreamingType;
+import org.apache.camel.component.twitter.data.TimelineType;
 import org.apache.camel.spi.Metadata;
 import org.apache.camel.spi.UriEndpoint;
 import org.apache.camel.spi.UriParam;
@@ -48,7 +49,7 @@ public class TwitterStreamingEndpoint extends AbstractTwitterEndpoint {
         if (remaining == null) {
             throw new IllegalArgumentException(String.format("The streaming type must be
specified for '%s'", uri));
         }
-        this.streamingType = StreamingType.valueOf(remaining.toUpperCase());
+        this.streamingType = component.getCamelContext().getTypeConverter().convertTo(StreamingType.class,
remaining);
         this.keywords = keywords;
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/1abeae7f/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/timeline/TwitterTimelineEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/timeline/TwitterTimelineEndpoint.java
b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/timeline/TwitterTimelineEndpoint.java
index 54b4aa0..0bfd70e 100644
--- a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/timeline/TwitterTimelineEndpoint.java
+++ b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/timeline/TwitterTimelineEndpoint.java
@@ -47,7 +47,7 @@ public class TwitterTimelineEndpoint extends AbstractTwitterEndpoint {
         if (remaining == null) {
             throw new IllegalArgumentException(String.format("The timeline type must be specified
for '%s'", uri));
         }
-        this.timelineType = TimelineType.valueOf(remaining.toUpperCase());
+        this.timelineType = component.getCamelContext().getTypeConverter().convertTo(TimelineType.class,
remaining);
         this.user = user;
     }
 


Mime
View raw message