Permalink
Browse files

- Fix for [1393]

  • Loading branch information...
1 parent dee4b42 commit 7fb32a0287f1e22a9d14d34b29da906224cb1db3 @pmalves pmalves committed with kimchy Oct 13, 2011
@@ -33,8 +33,10 @@ configurations {
dependencies {
compile project(':elasticsearch')
- compile('org.twitter4j:twitter4j-core:2.1.10') { transitive = false }
- distLib('org.twitter4j:twitter4j-core:2.1.10') { transitive = false }
+ compile('org.twitter4j:twitter4j-core:2.2.4') { transitive = false }
+ compile('org.twitter4j:twitter4j-stream:2.2.4') { transitive = false }
+ compile('org.twitter4j:twitter4j-core:2.2.4') { transitive = false }
+ compile('org.twitter4j:twitter4j-stream:2.2.4') { transitive = false }
}
task explodedDist(dependsOn: [jar], description: 'Builds the plugin zip file') << {
@@ -129,4 +131,4 @@ uploadArchives {
eclipseClasspath {
defaultOutputDir = file('build/eclipse-build')
-}
+}
@@ -138,7 +138,7 @@
if (follow != null) {
if (follow instanceof List) {
List lFollow = (List) follow;
- int[] followIds = new int[lFollow.size()];
+ long[] followIds = new long[lFollow.size()];
for (int i = 0; i < lFollow.size(); i++) {
Object o = lFollow.get(i);
if (o instanceof Number) {
@@ -150,7 +150,7 @@
filterQuery.follow(followIds);
} else {
String[] ids = Strings.commaDelimitedListToStringArray(follow.toString());
- int[] followIds = new int[ids.length];
+ long[] followIds = new long[ids.length];
for (int i = 0; i < ids.length; i++) {
followIds[i] = Integer.parseInt(ids[i]);
}
@@ -265,11 +265,9 @@
}
currentRequest = client.prepareBulk();
if (streamType.equals("filter") || filterQuery != null) {
- try {
+
stream.filter(filterQuery);
- } catch (TwitterException e) {
- logger.warn("failed to create filter stream based on query, disabling river....");
- }
+
} else if (streamType.equals("firehose")) {
stream.firehose(0);
} else {
@@ -309,11 +307,8 @@ private void reconnect() {
stream.addListener(new StatusHandler());
if (streamType.equals("filter") || filterQuery != null) {
- try {
- stream.filter(filterQuery);
- } catch (TwitterException e) {
- logger.warn("failed to create filter stream based on query, disabling river....");
- }
+ stream.filter(filterQuery);
+
} else if (streamType.equals("firehose")) {
stream.firehose(0);
} else {

0 comments on commit 7fb32a0

Please sign in to comment.