2 Commits
3 changed files with 4 additions and 4 deletions

No files matched your search

+1 -1
View File
@@ -4,7 +4,7 @@
<groupId>org.scribe</groupId>
<artifactId>scribe</artifactId>
<packaging>jar</packaging>
<version>1.0.4</version>
<version>1.0.5</version>
<name>OAuth Library</name>
<dependencies>
@@ -7,7 +7,7 @@ import org.scribe.model.OAuthConstants;
public class Preconditions
{
private static final String DEFAULT_MESSAGE = "Received an invalid parameter";
private static final Pattern URL_PATTERN = Pattern.compile("[a-zA-Z]+://\\S+");
private static final Pattern URL_PATTERN = Pattern.compile("[a-zA-Z_-]+://\\S+");
public static void checkNotNull(Object object, String errorMsg)
{
@@ -55,13 +55,13 @@ public class PreconditionsTest
public void shouldAllowNonStandarProtocolsForAndroid()
{
Preconditions.checkValidUrl("myUrl://www.example.com", ERROR_MSG);
Preconditions.checkValidUrl("x-url-custom://www.example.com", ERROR_MSG);
}
@Test(expected = IllegalArgumentException.class)
public void shouldNotAllowStrangeProtocolNames()
{
Preconditions.checkValidUrl("_weird*://www.example.com", ERROR_MSG);
Preconditions.checkValidUrl("$weird*://www.example.com", ERROR_MSG);
}
public void shouldAllowOutOfBandAsValidCallbackValue()