Skip to content

Commit

Permalink
Merge pull request #2 from WURFL/develop
Browse files Browse the repository at this point in the history
1.0.5 Release
  • Loading branch information
elliotfehr committed Nov 10, 2015
2 parents 3c4e061 + 98b783d commit 1163ad9
Show file tree
Hide file tree
Showing 45 changed files with 601 additions and 409 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
1.0.5
Add: Make connection and read timeouts configurable in `wurflcloud.properties` file

1.0.4
Add: `getDeviceFromUserAgent` method

1.0.3
Open source release

Expand Down
2 changes: 1 addition & 1 deletion code/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.scientiamobile.wurflcloud</groupId>
<artifactId>client-java</artifactId>
<version>1.0.4</version>
<version>1.0.5</version>
<packaging>jar</packaging>

<name>wurfl-cloud-client</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,22 @@ public AuthenticationManager(CloudClientConfig config) {
public Credentials splitApiKey() {
String api_key = config.apiKey;
if (api_key == null || api_key.length() == 0) {
throw new IllegalArgumentException("Api key must be not empty");
throw new IllegalArgumentException("API key must be not empty");
}

int indexOfColon = api_key.indexOf(':');
if (indexOfColon < 0) {
throw new IllegalArgumentException("Api key must contain a \':\' separator.");
throw new IllegalArgumentException("API key must contain a \':\' separator.");
}

String username = api_key.substring(0, indexOfColon);
if (username.length() == 0) {
throw new IllegalArgumentException("Api key username is empty.");
throw new IllegalArgumentException("API key username is empty.");
}

String pwd = api_key.substring(indexOfColon + 1);
if (pwd.length() == 0) {
throw new IllegalArgumentException("Api key password is empty.");
throw new IllegalArgumentException("API key password is empty.");
}

return new Credentials(username, pwd);
Expand Down
Loading

0 comments on commit 1163ad9

Please sign in to comment.