mirror of
https://github.com/moparisthebest/davmail
synced 2025-01-12 14:08:38 -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() {
|
protected String getTimezoneIdFromExchange() {
|
||||||
String timezoneId = null;
|
String timezoneId = null;
|
||||||
|
String timezoneName = null;
|
||||||
try {
|
try {
|
||||||
Set<String> attributes = new HashSet<String>();
|
Set<String> attributes = new HashSet<String>();
|
||||||
attributes.add("roamingdictionary");
|
attributes.add("roamingdictionary");
|
||||||
@ -2138,9 +2138,12 @@ public class DavExchangeSession extends ExchangeSession {
|
|||||||
if (responses.length == 1) {
|
if (responses.length == 1) {
|
||||||
byte[] roamingdictionary = getBinaryPropertyIfExists(responses[0].getProperties(HttpStatus.SC_OK), "roamingdictionary");
|
byte[] roamingdictionary = getBinaryPropertyIfExists(responses[0].getProperties(HttpStatus.SC_OK), "roamingdictionary");
|
||||||
if (roamingdictionary != null) {
|
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) {
|
} catch (UnsupportedEncodingException e) {
|
||||||
LOGGER.warn("Unable to retrieve Exchange timezone id: " + e.getMessage(), e);
|
LOGGER.warn("Unable to retrieve Exchange timezone id: " + e.getMessage(), e);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user