mirror of
https://github.com/moparisthebest/davmail
synced 2025-01-12 05:58:48 -05:00
Caldav: improve timezone error handling
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1452 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
e3b355034a
commit
8ff8591992
@ -2129,7 +2129,7 @@ public class DavExchangeSession extends ExchangeSession {
|
||||
|
||||
protected String getTimezoneIdFromExchange() {
|
||||
String timezoneId = null;
|
||||
|
||||
String timezoneName = null;
|
||||
try {
|
||||
Set<String> attributes = new HashSet<String>();
|
||||
attributes.add("roamingdictionary");
|
||||
@ -2138,9 +2138,12 @@ public class DavExchangeSession extends ExchangeSession {
|
||||
if (responses.length == 1) {
|
||||
byte[] roamingdictionary = getBinaryPropertyIfExists(responses[0].getProperties(HttpStatus.SC_OK), "roamingdictionary");
|
||||
if (roamingdictionary != null) {
|
||||
timezoneId = ResourceBundle.getBundle("timezoneids").getString(getTimezoneNameFromRoamingDictionary(roamingdictionary));
|
||||
timezoneName = getTimezoneNameFromRoamingDictionary(roamingdictionary);
|
||||
timezoneId = ResourceBundle.getBundle("timezoneids").getString(timezoneName);
|
||||
}
|
||||
}
|
||||
} catch (MissingResourceException e) {
|
||||
LOGGER.warn("Unable to retrieve Exchange timezone id for name "+timezoneName);
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
LOGGER.warn("Unable to retrieve Exchange timezone id: " + e.getMessage(), e);
|
||||
} catch (IOException e) {
|
||||
|
Loading…
Reference in New Issue
Block a user