From fc4a6f0b00a901293731c7b607586c63f161ca93 Mon Sep 17 00:00:00 2001 From: mguessan Date: Tue, 25 Oct 2011 21:44:36 +0000 Subject: [PATCH] Caldav: try to merge Exchange 2010 and 2007 filters git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1830 3d1905a2-6b24-0410-a738-b14d5a86fcbd --- .../exchange/ews/EwsExchangeSession.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/java/davmail/exchange/ews/EwsExchangeSession.java b/src/java/davmail/exchange/ews/EwsExchangeSession.java index 912cefd2..93d4494c 100644 --- a/src/java/davmail/exchange/ews/EwsExchangeSession.java +++ b/src/java/davmail/exchange/ews/EwsExchangeSession.java @@ -1569,14 +1569,15 @@ public class EwsExchangeSession extends ExchangeSession { @Override protected Condition getCalendarItemCondition(boolean excludeTasks, Condition dateCondition) { - if ("Exchange2010".equals(serverVersion)) { - // tasks in calendar not supported over EWS - return or(isTrue("isrecurring"), - and(isFalse("isrecurring"), dateCondition)); - } else { - return or(isEqualTo("instancetype", 1), - and(isEqualTo("instancetype", 0), dateCondition)); - } + // tasks in calendar not supported over EWS => do not look for instancetype null + return or( + // Exchange 2010 + or(isTrue("isrecurring"), + and(isFalse("isrecurring"), dateCondition)), + // Exchange 2007 + or(isEqualTo("instancetype", 1), + and(isEqualTo("instancetype", 0), dateCondition)) + ); } @Override