Skip to content

Commit

Permalink
Add null validations. Close omkarmoghe#300
Browse files Browse the repository at this point in the history
  • Loading branch information
socrates1982 committed Jul 28, 2016
1 parent d049833 commit 4764036
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ public LoginInfo getLoginInfo() {
String password = null;

for (String s :info) {
if(s.contains(INFO_TOKEN)){
if(s != null && s.contains(INFO_TOKEN)){
token = getStoredString(s);
continue;
}
if(s.contains(INFO_USERNAME)){
if(s != null && s.contains(INFO_USERNAME)){
username = getStoredString(s);
continue;
}
if(s.contains(INFO_PASSWORD)){
if(s != null && s.contains(INFO_PASSWORD)){
password = getStoredString(s);
}
}
Expand All @@ -88,11 +88,11 @@ public LoginInfo getLoginInfo() {
String refresh = null;

for (String s :info) {
if(s.contains(INFO_TOKEN)){
if(s != null && s.contains(INFO_TOKEN)){
token = getStoredString(s);
continue;
}
if(s.contains(INFO_PASSWORD)){
if(s != null && s.contains(INFO_PASSWORD)){
refresh = getStoredString(s);
}
}
Expand Down

0 comments on commit 4764036

Please sign in to comment.