Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.0/Cloud)

85569: Merged V4.2-BUG-FIX (4.2.4) to HEAD-BUG-FIX (5.0/Cloud)
      85495: MNT-12420: Outlook 2011 (MacOS) implements an IMAP move as an APPEND leading to the creation of an EML file
       - Fix NPE that was found during testing.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@94506 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2015-01-31 09:32:11 +00:00
parent 3eb7e5d52b
commit e408fcb1bb

View File

@@ -415,11 +415,14 @@ public class AlfrescoImapFolder extends AbstractImapFolder implements Serializab
//check X-Alfresco-NodeRef-ID header
try
{
uuid = message.getHeader(AlfrescoImapConst.X_ALF_NODEREF_ID)[0];
result = new NodeRef(StoreRef.PROTOCOL_WORKSPACE, "SpacesStore", uuid);
if (nodeService.exists(result) == false)
if (message.getHeader(AlfrescoImapConst.X_ALF_NODEREF_ID) != null)
{
result = null;
uuid = message.getHeader(AlfrescoImapConst.X_ALF_NODEREF_ID)[0];
result = new NodeRef(StoreRef.PROTOCOL_WORKSPACE, "SpacesStore", uuid);
if (nodeService.exists(result) == false)
{
result = null;
}
}
}
catch (MessagingException e)