EWS: Avoid null in log message

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2299 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2014-06-28 16:31:08 +00:00
parent 09c445fff8
commit 820ce179b1
1 changed files with 4 additions and 3 deletions

View File

@ -1466,7 +1466,8 @@ public class EwsExchangeSession extends ExchangeSession {
String type; String type;
boolean isException; boolean isException;
protected Event(EWSMethod.Item response) { protected Event(String folderPath, EWSMethod.Item response) {
this.folderPath = folderPath;
itemId = new ItemId(response); itemId = new ItemId(response);
type = response.type; type = response.type;
@ -1925,7 +1926,7 @@ public class EwsExchangeSession extends ExchangeSession {
condition, condition,
FolderQueryTraversal.SHALLOW, 0); FolderQueryTraversal.SHALLOW, 0);
for (EWSMethod.Item response : responses) { for (EWSMethod.Item response : responses) {
Event event = new Event(response); Event event = new Event(folderPath, response);
if ("Message".equals(event.type)) { if ("Message".equals(event.type)) {
// TODO: just exclude // TODO: just exclude
// need to check body // need to check body
@ -2034,7 +2035,7 @@ public class EwsExchangeSession extends ExchangeSession {
|| "Task".equals(itemType) || "Task".equals(itemType)
// VTODOs appear as Messages // VTODOs appear as Messages
|| "Message".equals(itemType)) { || "Message".equals(itemType)) {
return new Event(item); return new Event(folderPath, item);
} else { } else {
throw new HttpNotFoundException(itemName + " not found in " + folderPath); throw new HttpNotFoundException(itemName + " not found in " + folderPath);
} }