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

Bugfix/DE452288 Account Manager Util #365

Closed
wants to merge 3 commits into from

Conversation

abhisheknaidu-462
Copy link
Contributor

In the file AccountManagerUtil.java null pointer exception for accountType has been handled.

@@ -52,7 +52,7 @@ public AccountManagerUtil(Context context, String accountName, boolean sharedSto
//Attempt to retrieve the account
Account[] accounts = mAccountManager.getAccountsByType(accountType);
for (Account account : accounts) {
if (accountName.equals(account.name)) {
if (accountName != null && accountName.equals(account.name)) {
String password = mAccountManager.getPassword(account);
String savedPassword = identifier.toString();
if (password.equals(savedPassword)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add null check to password also as per logs here
#340

@@ -68,6 +68,8 @@ private MqttConnecta getMqttConnecta() {
if ((connectOptions == null) || (connectOptions.getServerURIs() == null)) {
return new GatewayMqttConnecta();
} else {
if (clientId == null)
throw new NullPointerException("clientId");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need null check here because not relevant to ticket logs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made the required changes as per the comments.

2) Removed null pointer check for clientId
@nagarajudeshettybroadcom
Copy link
Contributor

@abhisheknaidu-462 can you take a branch from develop and create PR to develop only please stable branch is no longer use

@abhisheknaidu-462 abhisheknaidu-462 requested a review from ab-sub June 16, 2021 07:02
@abhisheknaidu-462 abhisheknaidu-462 deleted the bugfix/DE452288-AccountManagerUtil branch June 18, 2021 07:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants