Skip to content

Commit

Permalink
Merge pull request aws#19 from gkeiser/patch-1
Browse files Browse the repository at this point in the history
Checking for null...this would have saved me time so I thought I'd submi...
  • Loading branch information
fulghum committed May 3, 2012
2 parents 8dc114d + 51bb741 commit e633d8a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/com/amazonaws/auth/BasicAWSCredentials.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ public class BasicAWSCredentials implements AWSCredentials {
* The AWS secret access key.
*/
public BasicAWSCredentials(String accessKey, String secretKey) {
if (accessKey == null) {
throw new IllegalArgumentException("Access Key cannot be null.");
}
if (secretKey == null) {
throw new IllegalArgumentException("Secret Key cannot be null.");
}
this.accessKey = accessKey;
this.secretKey = secretKey;
}
Expand Down

0 comments on commit e633d8a

Please sign in to comment.