Permalink
Browse files

Fixed whitespace error introduced with my patches

  • Loading branch information...
1 parent 25eba20 commit e4b51d63cee4c2095f695108f789ad7770ed4ad3 @marcust committed Nov 28, 2011
@@ -23,7 +23,7 @@ public String getAccessTokenEndpoint()
@Override
public String getAuthorizationUrl(OAuthConfig config)
{
- Preconditions.check(config.getCallback().hasValidUrl(), "Must provide a valid url as callback. Live does not support OOB");
+ Preconditions.check(config.getCallback().hasValidUrl(), "Must provide a valid url as callback. Live does not support OOB");
// Append scope if present
if (config.hasScope())
@@ -39,43 +39,41 @@ public String getCallbackValue() {
}
public String makeURLEncodedValue() {
- return URLUtils.formURLEncode(callbackValue);
+ return URLUtils.formURLEncode(callbackValue);
}
public boolean addToRequest() {
- return this != NONE && this.callbackValue != null;
+ return this != NONE && this.callbackValue != null;
}
public boolean hasValidUrl() {
- return this != NONE && this != OUT_OF_BAND;
+ return this != NONE && this != OUT_OF_BAND;
}
@Override
public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result
- + ((callbackValue == null) ? 0 : callbackValue.hashCode());
- return result;
+ final int prime = 31;
+ int result = 1;
+ result = prime * result
+ + ((callbackValue == null) ? 0 : callbackValue.hashCode());
+ return result;
}
@Override
public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- Callback other = (Callback) obj;
- if (callbackValue == null) {
- if (other.callbackValue != null)
- return false;
- } else if (!callbackValue.equals(other.callbackValue))
- return false;
- return true;
- }
-
-
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ Callback other = (Callback) obj;
+ if (callbackValue == null) {
+ if (other.callbackValue != null)
+ return false;
+ } else if (!callbackValue.equals(other.callbackValue))
+ return false;
+ return true;
+ }
}
@@ -65,7 +65,7 @@ public Token getAccessToken(Token requestToken, Verifier verifier)
OAuthRequest request = new OAuthRequest(api.getAccessTokenVerb(), api.getAccessTokenEndpoint());
request.addOAuthParameter(OAuthConstants.TOKEN, requestToken.getToken());
if ( verifier.isDefined() ) {
- request.addOAuthParameter(OAuthConstants.VERIFIER, verifier.getValue());
+ request.addOAuthParameter(OAuthConstants.VERIFIER, verifier.getValue());
}
addOAuthParams(request, requestToken);
addSignature(request);
@@ -31,12 +31,12 @@ public Token getAccessToken(Token requestToken, Verifier verifier)
request.addQuerystringParameter(OAuthConstants.CLIENT_ID, config.getApiKey());
request.addQuerystringParameter(OAuthConstants.CLIENT_SECRET, config.getApiSecret());
if ( verifier.isDefined() ) {
- request.addQuerystringParameter(OAuthConstants.CODE, verifier.getValue());
+ request.addQuerystringParameter(OAuthConstants.CODE, verifier.getValue());
}
final Callback callback = config.getCallback();
if ( callback.addToRequest() ) {
- request.addOAuthParameter(OAuthConstants.REDIRECT_URI, callback.getCallbackValue() );
+ request.addOAuthParameter(OAuthConstants.REDIRECT_URI, callback.getCallbackValue() );
}
if(config.hasScope()) request.addQuerystringParameter(OAuthConstants.SCOPE, config.getScope());
Response response = request.send();

0 comments on commit e4b51d6

Please sign in to comment.