poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From talli...@apache.org
Subject svn commit: r1784989 - /poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/MAPIMessage.java
Date Wed, 01 Mar 2017 16:49:15 GMT
Author: tallison
Date: Wed Mar  1 16:49:15 2017
New Revision: 1784989

URL: http://svn.apache.org/viewvc?rev=1784989&view=rev
Log:
Bug 60795 -- fixed deprecation, thanks to Javen.

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=1784989&r1=1784988&r2=1784989&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 Wed Mar  1 16:49:15
2017
@@ -52,6 +52,7 @@ import org.apache.poi.poifs.filesystem.N
 import org.apache.poi.util.CodePageUtil;
 import org.apache.poi.util.POILogFactory;
 import org.apache.poi.util.POILogger;
+import org.apache.poi.util.Removal;
 
 /**
  * Reads an Outlook MSG File in and provides hooks into its data structure.
@@ -542,8 +543,10 @@ public class MAPIMessage extends POIRead
     * For emails the class will be IPM.Note
     *
     * @throws ChunkNotFoundException
-    * @deprecated use {@link #getMessageClassEnum()}
+    * @deprecated 3.16 beta 3. Use {@link #getMessageClassEnum()} instead.
     */
+   @Deprecated
+   @Removal(version="3.18")
    public String getMessageClass() throws ChunkNotFoundException {
       return getStringFromChunk(mainChunks.getMessageClass());
    }
@@ -557,7 +560,7 @@ public class MAPIMessage extends POIRead
     * @throws ChunkNotFoundException
     */
    public MESSAGE_CLASS getMessageClassEnum() throws ChunkNotFoundException {
-      String mc = getMessageClass();
+      String mc = getStringFromChunk(mainChunks.getMessageClass());
       if (mc == null || mc.trim().length() == 0) {
          return MESSAGE_CLASS.UNSPECIFIED;
       } else if (mc.equalsIgnoreCase("IPM.Note")) {



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


Mime
View raw message