]> source.dussan.org Git - poi.git/commitdiff
Fix typo, leave the old version there deprecated for now
authorNick Burch <nick@apache.org>
Thu, 6 Oct 2011 19:44:48 +0000 (19:44 +0000)
committerNick Burch <nick@apache.org>
Thu, 6 Oct 2011 19:44:48 +0000 (19:44 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1179787 13f79535-47bb-0310-9956-ffa450edef68

src/scratchpad/src/org/apache/poi/hsmf/MAPIMessage.java
src/scratchpad/testcases/org/apache/poi/hsmf/TestBasics.java
src/scratchpad/testcases/org/apache/poi/hsmf/TestOutlook30FileRead.java

index 0cc31b91afbd9169dd5fc934fddffd0d9e633d2f..570bc6d6255e47c2c2c08f9b87122dc47a28a6fa 100644 (file)
@@ -185,12 +185,16 @@ public class MAPIMessage extends POIDocument {
     * @return The string representation of the 'html' version of the body, if available.
     * @throws ChunkNotFoundException
     */
-   public String getHmtlBody() throws ChunkNotFoundException {
+   public String getHtmlBody() throws ChunkNotFoundException {
       if(mainChunks.htmlBodyChunkBinary != null) {
          return mainChunks.htmlBodyChunkBinary.getAs7bitString();
       }
       return getStringFromChunk(mainChunks.htmlBodyChunkString);
    }
+   @Deprecated
+   public String getHmtlBody() throws ChunkNotFoundException {
+      return getHtmlBody();
+   }
 
    /**
     * Gets the RTF Rich Message body of this Outlook Message, if this email
index e5d9a6e1d67bc37e73b1bf5621f8cc93516237d8..9b2321ac71dc12557afae5be80b03b6996b9022a 100644 (file)
@@ -222,7 +222,7 @@ public final class TestBasics extends TestCase {
          fail("File doesn't have headers!");
       } catch(ChunkNotFoundException e) {}
       
-      String html = chinese.getHmtlBody();
+      String html = chinese.getHtmlBody();
       assertTrue("Charset not found:\n" + html, html.contains("text/html; charset=big5"));
       
       // Defaults to CP1251
index 9c2b5d0f65ba2b645290ffd991d0b46c79ffe0fc..435f9bcf0973c329eccf08d8e7be478e548fbb67 100644 (file)
@@ -134,7 +134,7 @@ private MAPIMessage mapiMessage;
     * Ensure we can get the HTML and RTF versions
     */
    public void testReadBodyContents() throws Exception {
-      String html = mapiMessage.getHmtlBody();
+      String html = mapiMessage.getHtmlBody();
       String rtf = mapiMessage.getRtfBody();
       assertNotNull(html);
       assertNotNull(rtf);