From 83d74919db151c972a8c195c3c56c391accccabf Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Thu, 24 Apr 2014 18:20:03 +0200 Subject: Make OAuthRequester.isValid() match the contract --- src/mining/OAuthRequester.java | 6 +++--- 1 file 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 -- cgit v1.2.1