mirror of
https://github.com/moparisthebest/davmail
synced 2025-01-05 18:58:02 -05:00
Caldav: Fix NullPointerException in getTimezoneIdFromExchange
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1695 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
44c9fdba0e
commit
694bacc4e0
@ -990,7 +990,7 @@ public class DavExchangeSession extends ExchangeSession {
|
|||||||
@Override
|
@Override
|
||||||
public Condition isFalse(String attributeName) {
|
public Condition isFalse(String attributeName) {
|
||||||
if ("Exchange2003".equals(this.serverVersion) && "deleted".equals(attributeName)) {
|
if ("Exchange2003".equals(this.serverVersion) && "deleted".equals(attributeName)) {
|
||||||
return or(isEqualTo(attributeName, "0"), isNull(attributeName));
|
return or(isEqualTo(attributeName, "0"), isNull(attributeName));
|
||||||
} else {
|
} else {
|
||||||
return new MonoCondition(attributeName, Operator.IsFalse);
|
return new MonoCondition(attributeName, Operator.IsFalse);
|
||||||
}
|
}
|
||||||
@ -2149,7 +2149,9 @@ public class DavExchangeSession extends ExchangeSession {
|
|||||||
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) {
|
||||||
timezoneName = getTimezoneNameFromRoamingDictionary(roamingdictionary);
|
timezoneName = getTimezoneNameFromRoamingDictionary(roamingdictionary);
|
||||||
timezoneId = ResourceBundle.getBundle("timezoneids").getString(timezoneName);
|
if (timezoneName != null) {
|
||||||
|
timezoneId = ResourceBundle.getBundle("timezoneids").getString(timezoneName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (MissingResourceException e) {
|
} catch (MissingResourceException e) {
|
||||||
@ -2578,8 +2580,8 @@ public class DavExchangeSession extends ExchangeSession {
|
|||||||
public int read(byte buffer[], int offset, int length) throws IOException {
|
public int read(byte buffer[], int offset, int length) throws IOException {
|
||||||
int count = super.read(buffer, offset, length);
|
int count = super.read(buffer, offset, length);
|
||||||
totalCount += count;
|
totalCount += count;
|
||||||
if (totalCount - lastLogCount > 1024*1024) {
|
if (totalCount - lastLogCount > 1024 * 1024) {
|
||||||
LOGGER.debug("Downloaded " + (totalCount/1024) + " KBytes from " + method.getURI());
|
LOGGER.debug("Downloaded " + (totalCount / 1024) + " KBytes from " + method.getURI());
|
||||||
DavGatewayTray.switchIcon();
|
DavGatewayTray.switchIcon();
|
||||||
lastLogCount = totalCount;
|
lastLogCount = totalCount;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user