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:
parent
62415480cf
commit
71493a5a28
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user