1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-12-14 11:42:23 -05:00

Caldav: Fix invalid event handling, exclude events from returned list

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@910 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2010-01-14 09:46:48 +00:00
parent 741ba5f889
commit eaed630ea4

View File

@ -2481,7 +2481,13 @@ public class ExchangeSession {
String instancetype = getPropertyIfExists(response.getProperties(HttpStatus.SC_OK), "instancetype", Namespace.getNamespace("urn:schemas:calendar:")); String instancetype = getPropertyIfExists(response.getProperties(HttpStatus.SC_OK), "instancetype", Namespace.getNamespace("urn:schemas:calendar:"));
Event event = buildEvent(response); Event event = buildEvent(response);
if (instancetype == null && event.getICS() == null) { if (instancetype == null && event.getICS() == null) {
LOGGER.warn("Invalid event found at " + response.getHref()); // check ics content
try {
event.getICS();
} catch (IOException e) {
// invalid event: exclude from list
LOGGER.warn("Invalid event found at " + response.getHref(), e);
}
} else { } else {
events.add(event); events.add(event);
} }