mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-14 03:32:22 -05:00
Fix Bug 2517478: check if fbdata is not empty
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@296 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
4f75dea6b7
commit
9f9e588729
@ -481,7 +481,7 @@ public class ExchangeSession {
|
||||
throw new IOException("Overwritten message " + messageUrl);
|
||||
}
|
||||
} else if (code != HttpURLConnection.HTTP_CREATED) {
|
||||
throw new IOException("Unable to create message " + code + " " + putmethod.getStatusLine());
|
||||
throw new IOException("Unable to create message " + messageUrl + ": " + code + " " + putmethod.getStatusLine());
|
||||
}
|
||||
} finally {
|
||||
if (bodyStream != null) {
|
||||
@ -1308,6 +1308,7 @@ public class ExchangeSession {
|
||||
int endIndex = body.lastIndexOf("</a:fbdata>");
|
||||
if (startIndex >= 0 && endIndex >= 0) {
|
||||
String fbdata = body.substring(startIndex + "<a:fbdata>".length(), endIndex);
|
||||
if (fbdata.length() > 0) {
|
||||
Calendar currentCal = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
|
||||
currentCal.setTime(startDate);
|
||||
|
||||
@ -1340,6 +1341,7 @@ public class ExchangeSession {
|
||||
result = busyBuffer.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
getMethod.releaseConnection();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user