From 173bac593b7d14e98ae26cb2dd45aec493f68f61 Mon Sep 17 00:00:00 2001 From: mguessan Date: Sun, 2 Jan 2011 22:12:41 +0000 Subject: [PATCH] Caldav: improve timezone rename error message git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1587 3d1905a2-6b24-0410-a738-b14d5a86fcbd --- src/java/davmail/exchange/VCalendar.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/java/davmail/exchange/VCalendar.java b/src/java/davmail/exchange/VCalendar.java index ceb0bd74..39749580 100644 --- a/src/java/davmail/exchange/VCalendar.java +++ b/src/java/davmail/exchange/VCalendar.java @@ -149,10 +149,13 @@ public class VCalendar extends VObject { // get current tzid VObject vObject = getVTimezone(); if (vObject != null) { - try { - tzid = ResourceBundle.getBundle("timezones").getString(vObject.getPropertyValue("TZID")); - } catch (MissingResourceException e) { - LOGGER.debug("Timezone rename failed, timezone "+vObject.getPropertyValue("TZID")+" not found in table"); + String currentTzid = vObject.getPropertyValue("TZID"); + if (currentTzid != null && currentTzid.indexOf(' ') >= 0) { + try { + tzid = ResourceBundle.getBundle("timezones").getString(currentTzid); + } catch (MissingResourceException e) { + LOGGER.debug("Timezone rename failed, timezone " + currentTzid + " not found in table"); + } } } }