Merged 5.1.N (5.1.2) to 5.2.N (5.2.1)

126025 aleahu: Merged 5.0.N (5.0.4) to 5.1.N (5.1.2)
      125910 rmunteanu: MNT-15553 : Inconsistent search result with .eml files.
         - Fix transformation for eml files containing nested alternative parts.
         - Added test.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@126063 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alexandra Leahu
2016-05-04 12:38:32 +00:00
parent a2a1443cd1
commit 5ffc53461d
3 changed files with 73 additions and 2 deletions

View File

@@ -169,8 +169,16 @@ public class EMLTransformer extends AbstractContentTransformer2
partToUse = part;
break;
}
else if (part.getContentType().contains(MimetypeMap.MIMETYPE_HTML)){
else if (part.getContentType().contains(MimetypeMap.MIMETYPE_HTML))
{
partToUse = part;
}
else if (part.getContentType().contains(MimetypeMap.MIMETYPE_MULTIPART_ALTERNATIVE))
{
if (part.getContent() instanceof Multipart)
{
processAlternativeMultipart((Multipart) part.getContent(), sb);
}
}
}
if (partToUse != null)