From coverity: avoid null dereference in getFolderPath

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2277 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2014-03-19 22:24:34 +00:00
parent 248efafa1d
commit d960fd65ec
1 changed files with 1 additions and 1 deletions

View File

@ -202,7 +202,7 @@ public class DavExchangeSession extends ExchangeSession {
} }
if (principal.length() == 0) { if (principal.length() == 0) {
exchangeFolderPath = rootPath; exchangeFolderPath = rootPath;
} else if (alias.equalsIgnoreCase(principal) || email.equalsIgnoreCase(principal)) { } else if (alias.equalsIgnoreCase(principal) || (email != null && email.equalsIgnoreCase(principal))) {
exchangeFolderPath = mailPath + localPath; exchangeFolderPath = mailPath + localPath;
} else { } else {
LOGGER.debug("Detected shared path for principal " + principal + ", user principal is " + email); LOGGER.debug("Detected shared path for principal " + principal + ", user principal is " + email);