poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From max...@apache.org
Subject svn commit: r1171628 - /poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/MAPIMessage.java
Date Fri, 16 Sep 2011 15:38:50 GMT
Author: maxcom
Date: Fri Sep 16 15:38:50 2011
New Revision: 1171628

URL: http://svn.apache.org/viewvc?rev=1171628&view=rev
Log:
MAPIMessage: fix NPE in set7BitEncoding

Modified:
    poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/MAPIMessage.java

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/MAPIMessage.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/MAPIMessage.java?rev=1171628&r1=1171627&r2=1171628&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/MAPIMessage.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/MAPIMessage.java Fri Sep 16 15:38:50
2011
@@ -413,11 +413,15 @@ public class MAPIMessage extends POIDocu
             ((StringChunk)c).set7BitEncoding(charset);
          }
       }
-      for(Chunk c : nameIdChunks.getAll()) {
-         if(c instanceof StringChunk) {
-            ((StringChunk)c).set7BitEncoding(charset);
+
+      if (nameIdChunks!=null) {
+         for(Chunk c : nameIdChunks.getAll()) {
+            if(c instanceof StringChunk) {
+                ((StringChunk)c).set7BitEncoding(charset);
+            }
          }
       }
+
       for(RecipientChunks rc : recipientChunks) {
          for(Chunk c : rc.getAll()) {
             if(c instanceof StringChunk) {



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message