This repository has been archived by the owner on Jan 21, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…pointer exception 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)) { |
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
@abhisheknaidu-462 can you take a branch from develop and create PR to develop only please stable branch is no longer use |
patrickpaulin
approved these changes
Dec 3, 2020
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In the file AccountManagerUtil.java null pointer exception for accountType has been handled.