Skip to content
This repository was archived by the owner on Jan 21, 2022. It is now read-only.

Commit b0dcedd

Browse files
Error AccountManagerUtil MAS foundation Android SDK - Null pointer exception
1 parent 9ad538c commit b0dcedd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mas-foundation/src/main/java/com/ca/mas/core/storage/sharedstorage/AccountManagerUtil.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ public AccountManagerUtil(Context context, String accountName, boolean sharedSto
5252
//Attempt to retrieve the account
5353
Account[] accounts = mAccountManager.getAccountsByType(accountType);
5454
for (Account account : accounts) {
55-
if (accountName.equals(account.name)) {
55+
if (accountName != null && accountName.equals(account.name)) {
5656
String password = mAccountManager.getPassword(account);
5757
String savedPassword = identifier.toString();
58-
if (password.equals(savedPassword)) {
58+
if (password != null && password.equals(savedPassword)) {
5959
mAccount = account;
6060
}else {
6161
// - case migration from old AccountManagerStoreDataSource

0 commit comments

Comments
 (0)