1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-12-13 19:22:22 -05:00

EWS: fix NullPointerException in item getContent

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1641 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2011-03-16 10:55:09 +00:00
parent 62415480cf
commit 71493a5a28

View File

@ -460,7 +460,11 @@ public class EwsExchangeSession extends ExchangeSession {
protected byte[] getContent(ItemId itemId) throws IOException {
GetItemMethod getItemMethod = new GetItemMethod(BaseShape.ID_ONLY, itemId, true);
executeMethod(getItemMethod);
return getItemMethod.getMimeContent();
byte[] mimeContent = getItemMethod.getMimeContent();
if (mimeContent == null) {
throw new IOException("GetItem returned null MimeContent");
}
return mimeContent;
}
protected Message buildMessage(EWSMethod.Item response) throws DavMailException {