MAPIMessage: fix NPE in set7BitEncoding

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1171628 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Maxim Valyanskiy 2011-09-16 15:38:50 +00:00
parent a75bc22211
commit 6d080eb3bf

View File

@ -413,11 +413,15 @@ public class MAPIMessage extends POIDocument {
((StringChunk)c).set7BitEncoding(charset); ((StringChunk)c).set7BitEncoding(charset);
} }
} }
if (nameIdChunks!=null) {
for(Chunk c : nameIdChunks.getAll()) { for(Chunk c : nameIdChunks.getAll()) {
if(c instanceof StringChunk) { if(c instanceof StringChunk) {
((StringChunk)c).set7BitEncoding(charset); ((StringChunk)c).set7BitEncoding(charset);
} }
} }
}
for(RecipientChunks rc : recipientChunks) { for(RecipientChunks rc : recipientChunks) {
for(Chunk c : rc.getAll()) { for(Chunk c : rc.getAll()) {
if(c instanceof StringChunk) { if(c instanceof StringChunk) {