summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2014-04-24 18:20:03 +0200
committerPeter Wu <peter@lekensteyn.nl>2014-04-25 01:40:09 +0200
commit83d74919db151c972a8c195c3c56c391accccabf (patch)
treed2116c99cf6c72c33690b4ff009f79848e82749d
parent33c8daf172561f6bd303b2290f44bb02c329a022 (diff)
downloadTwitterDataAnalytics-83d74919db151c972a8c195c3c56c391accccabf.tar.gz
Make OAuthRequester.isValid() match the contract
-rw-r--r--src/mining/OAuthRequester.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mining/OAuthRequester.java b/src/mining/OAuthRequester.java
index d3215c6..76d21c4 100644
--- a/src/mining/OAuthRequester.java
+++ b/src/mining/OAuthRequester.java
@@ -76,8 +76,8 @@ public class OAuthRequester extends AbstractRequester {
/**
* Gets access tokens from a PIN (out-of-band method). The PIN can be
- * retrieved by visiting the URL from {@code getAuthURL()}.
- * See https://dev.twitter.com/docs/auth/pin-based-authorization
+ * retrieved by visiting the URL from {@code getAuthURL()}. See
+ * https://dev.twitter.com/docs/auth/pin-based-authorization
*
* @param pin The PIN as found on the page.
* @throws IOException if the PIN cannot be used to retrieve access tokens.
@@ -102,7 +102,7 @@ public class OAuthRequester extends AbstractRequester {
@Override
public boolean isValid() throws IOException {
if (consumer.getToken() == null) {
- throw new IOException("I... Need... ACCESS TOKENS!!!");
+ return false;
}
// NOTE: this actually contributes to the ratelimit (12/minute)
// TODO: find alternative that does not hit the ratelimit