You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streams.apache.org by sb...@apache.org on 2014/05/13 17:22:59 UTC

[09/14] git commit: was missing imports and using random in a way that wouldn't build in jdk6

was missing imports and using random in a way that wouldn't build in jdk6


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

Branch: refs/heads/master
Commit: 1cc9d0bb8b54f24f20fa979ba84e9269603b896e
Parents: 145ec84
Author: sblackmon <sb...@w2odigital.com>
Authored: Thu May 8 14:32:14 2014 -0500
Committer: sblackmon <sb...@w2odigital.com>
Committed: Thu May 8 14:32:14 2014 -0500

----------------------------------------------------------------------
 .../streams/twitter/provider/TwitterTimelineProvider.java       | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/1cc9d0bb/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/provider/TwitterTimelineProvider.java
----------------------------------------------------------------------
diff --git a/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/provider/TwitterTimelineProvider.java b/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/provider/TwitterTimelineProvider.java
index db1ec76..799abe7 100644
--- a/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/provider/TwitterTimelineProvider.java
+++ b/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/provider/TwitterTimelineProvider.java
@@ -23,8 +23,10 @@ import twitter4j.json.DataObjectFactory;
 
 import java.io.Serializable;
 import java.math.BigInteger;
+import java.lang.Math;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
 import java.util.Queue;
 import java.util.concurrent.ArrayBlockingQueue;
 import java.util.concurrent.ExecutorService;
@@ -154,7 +156,7 @@ public class TwitterTimelineProvider implements StreamsProvider, Serializable {
         try {
             // wait one tenth of a millisecond
             Thread.yield();
-            Thread.sleep(new Random().nextInt(2));
+            Thread.sleep(1);
             Thread.yield();
         }
         catch(IllegalArgumentException e) {
@@ -260,7 +262,6 @@ public class TwitterTimelineProvider implements StreamsProvider, Serializable {
                 .setAsyncNumThreads(3)
                 .setRestBaseURL(baseUrl)
                 .setIncludeMyRetweetEnabled(Boolean.TRUE)
-                .setIncludeRTsEnabled(Boolean.TRUE)
                 .setPrettyDebugEnabled(Boolean.TRUE);
 
         return new TwitterFactory(builder.build()).getInstance();