Fixed conditional
This commit is contained in:
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));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in new issue
Block a user