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,12 +41,13 @@ public class OAuthRequest extends Request
private String checkKey(String key)
{
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
if (key.startsWith(OAUTH_PREFIX) || key.equals(OAuthConstants.SCOPE))
{
return key;
}
else
{
throw new IllegalArgumentException(String.format("OAuth parameters must either be '%s' or start with '%s'", OAuthConstants.SCOPE, OAUTH_PREFIX));
}
}