Skip to content

Commit 9dd5a3f

Browse files
committed
Merge pull request #157 from tomhoag/issue156
Issue156: Added NSAssert to setClient: methods to check for nil values in keyChain...
2 parents cf4d87f + f84a8cf commit 9dd5a3f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Sources/OAuth2Client/NXOAuth2AccountStore.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,8 @@ - (void)setClientID:(NSString *)aClientID
252252
keyChainGroup:(NSString *)aKeyChainGroup
253253
forAccountType:(NSString *)anAccountType;
254254
{
255+
NSAssert(!aKeyChainGroup, @"keyChainGroup must be non-nil");
256+
255257
[self setConfiguration:[NSDictionary dictionaryWithObjectsAndKeys:
256258
aClientID, kNXOAuth2AccountStoreConfigurationClientID,
257259
aSecret, kNXOAuth2AccountStoreConfigurationSecret,
@@ -273,6 +275,9 @@ - (void)setClientID:(NSString *)aClientID
273275
tokenType:(NSString *)aTokenType
274276
forAccountType:(NSString *)anAccountType;
275277
{
278+
NSAssert(!aKeyChainGroup, @"keyChainGroup must be non-nil");
279+
NSAssert(!aTokenType, @"tokenType must be non-nil");
280+
276281
[self setConfiguration:[NSDictionary dictionaryWithObjectsAndKeys:
277282
aClientID, kNXOAuth2AccountStoreConfigurationClientID,
278283
aSecret, kNXOAuth2AccountStoreConfigurationSecret,

0 commit comments

Comments
 (0)