Fixed conditional

This commit is contained in:
Pablo Fernandez committed 2010-10-27 15:27:35 -03:00
1 parent ed0970c8cb
commit 9cb2af37c7
1 file changed
+5 -4
@@ -41,13 +41,14 @@ public class OAuthRequest extends Request
private String checkKey(String key) private String checkKey(String key)
{ {
if (!key.startsWith(OAUTH_PREFIX) || !key.equals(OAuthConstants.SCOPE)) if (key.startsWith(OAUTH_PREFIX) || key.equals(OAuthConstants.SCOPE))
{
throw new IllegalArgumentException(String.format("OAuth parameters must either be %s or start with '%s'", OAuthConstants.SCOPE, OAUTH_PREFIX));
} else
{ {
return key; return key;
} }
else
{
throw new IllegalArgumentException(String.format("OAuth parameters must either be '%s' or start with '%s'", OAuthConstants.SCOPE, OAUTH_PREFIX));
}
} }
/** /**