From 2641bb475fd2e8c54edb27abdcdf3bf20c1b6935 Mon Sep 17 00:00:00 2001 From: Dominik Stadler Date: Fri, 3 Jul 2015 10:32:53 +0000 Subject: [PATCH] Bug 57678: Apply patch to better handle years in mail-messages between 1980 and 1999. git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1688993 13f79535-47bb-0310-9956-ffa450edef68 --- .../datatypes/MessageSubmissionChunk.java | 6 +- .../org/apache/poi/hsmf/AllHSMFTests.java | 5 +- .../TestMessageSubmissionChunkY2KRead.java | 67 ++++++++++++++++++ test-data/hsmf/message_1979.msg | Bin 0 -> 29696 bytes test-data/hsmf/message_1980.msg | Bin 0 -> 29696 bytes test-data/hsmf/message_1981.msg | Bin 0 -> 29696 bytes 6 files changed, 74 insertions(+), 4 deletions(-) create mode 100644 src/scratchpad/testcases/org/apache/poi/hsmf/TestMessageSubmissionChunkY2KRead.java create mode 100644 test-data/hsmf/message_1979.msg create mode 100644 test-data/hsmf/message_1980.msg create mode 100644 test-data/hsmf/message_1981.msg diff --git a/src/scratchpad/src/org/apache/poi/hsmf/datatypes/MessageSubmissionChunk.java b/src/scratchpad/src/org/apache/poi/hsmf/datatypes/MessageSubmissionChunk.java index c8867a6c75..985e58fce6 100644 --- a/src/scratchpad/src/org/apache/poi/hsmf/datatypes/MessageSubmissionChunk.java +++ b/src/scratchpad/src/org/apache/poi/hsmf/datatypes/MessageSubmissionChunk.java @@ -77,7 +77,11 @@ public class MessageSubmissionChunk extends Chunk { Matcher m = datePatern.matcher(dateS); if(m.matches()) { date = Calendar.getInstance(); - date.set(Calendar.YEAR, Integer.parseInt(m.group(1)) + 2000); + + // work around issues with dates like 1989, which appear as "89" here + int year = Integer.parseInt(m.group(1)); + date.set(Calendar.YEAR, year + (year > 80 ? 1900 : 2000)); + date.set(Calendar.MONTH, Integer.parseInt(m.group(2)) - 1); // Java is 0 based date.set(Calendar.DATE, Integer.parseInt(m.group(3))); date.set(Calendar.HOUR_OF_DAY, Integer.parseInt(m.group(4))); diff --git a/src/scratchpad/testcases/org/apache/poi/hsmf/AllHSMFTests.java b/src/scratchpad/testcases/org/apache/poi/hsmf/AllHSMFTests.java index 710d991d96..fe8cb11243 100644 --- a/src/scratchpad/testcases/org/apache/poi/hsmf/AllHSMFTests.java +++ b/src/scratchpad/testcases/org/apache/poi/hsmf/AllHSMFTests.java @@ -27,19 +27,18 @@ import org.apache.poi.hsmf.parsers.*; public final class AllHSMFTests { public static Test suite() { TestSuite suite = new TestSuite(AllHSMFTests.class.getName()); + suite.addTestSuite(TestBasics.class); suite.addTestSuite(TestBlankFileRead.class); suite.addTestSuite(TestSimpleFileRead.class); suite.addTestSuite(TestOutlook30FileRead.class); suite.addTestSuite(TestFileWithAttachmentsRead.class); - suite.addTestSuite(TestChunkData.class); suite.addTestSuite(TestTypes.class); suite.addTestSuite(TestSorters.class); - suite.addTestSuite(TestOutlookTextExtractor.class); - suite.addTestSuite(TestPOIFSChunkParser.class); + suite.addTestSuite(TestMessageSubmissionChunkY2KRead.class); return suite; } diff --git a/src/scratchpad/testcases/org/apache/poi/hsmf/TestMessageSubmissionChunkY2KRead.java b/src/scratchpad/testcases/org/apache/poi/hsmf/TestMessageSubmissionChunkY2KRead.java new file mode 100644 index 0000000000..c10ba0b65f --- /dev/null +++ b/src/scratchpad/testcases/org/apache/poi/hsmf/TestMessageSubmissionChunkY2KRead.java @@ -0,0 +1,67 @@ +/* ==================================================================== + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +==================================================================== */ + +package org.apache.poi.hsmf; + +import java.io.IOException; + +import org.apache.poi.hsmf.MAPIMessage; +import org.apache.poi.hsmf.exceptions.ChunkNotFoundException; +import org.apache.poi.POIDataSamples; + +import java.util.Calendar; + +import junit.framework.TestCase; + +public final class TestMessageSubmissionChunkY2KRead extends TestCase { + + private MAPIMessage mapiMessage1979; + private MAPIMessage mapiMessage1980; + private MAPIMessage mapiMessage1981; + + /** + * Initialise this test, load up the three test messages. + * @throws Exception + */ + public TestMessageSubmissionChunkY2KRead() throws IOException { + POIDataSamples samples = POIDataSamples.getHSMFInstance(); + this.mapiMessage1979 = new MAPIMessage(samples.openResourceAsStream("message_1979.msg")); + this.mapiMessage1980 = new MAPIMessage(samples.openResourceAsStream("message_1980.msg")); + this.mapiMessage1981 = new MAPIMessage(samples.openResourceAsStream("message_1981.msg")); + } + + // 1979 is one year before our pivot year (so this is an expected "failure") + public void testReadMessageDate1979() throws ChunkNotFoundException { + final Calendar date = mapiMessage1979.getMessageDate(); + final int year = date.get(Calendar.YEAR); + TestCase.assertEquals(2079, year); + } + + // 1980 is our pivot year (so this is an expected "failure") + public void testReadMessageDate1980() throws ChunkNotFoundException { + final Calendar date = mapiMessage1980.getMessageDate(); + final int year = date.get(Calendar.YEAR); + TestCase.assertEquals(2080, year); + } + + // 1981 is one year after our pivot year (so this starts working) + public void testReadMessageDate1981() throws ChunkNotFoundException { + final Calendar date = mapiMessage1981.getMessageDate(); + final int year = date.get(Calendar.YEAR); + TestCase.assertEquals(1981, year); + } +} diff --git a/test-data/hsmf/message_1979.msg b/test-data/hsmf/message_1979.msg new file mode 100644 index 0000000000000000000000000000000000000000..10083c8e4966ebc4f2515bca2604f5280811b577 GIT binary patch literal 29696 zcmeHPYj9h~bzT6Z_<%?eqF$sV=!&)_+Y+7x9{@!OAOKRd_!3Dy>zD*Vh=fG~5FXSc zi9^{=?WUbZ&P*Q@PhvXqOf#O&#Gd9yGj(m+<7PaabgVdWQ_u7vHBMqDomy7h*iK@r z=i7@*0u+I}5KVjR@L&%1p1o)H+}*po=j_?td+BAv<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3ECCmlISx5^BZag>5#Nbnj|$Bjs@aL zOJIU@UxfBgOodu1%F9NgsmN#`ezvvFM9@0aL#L_xh;N7<3rK%9pS7`}p~39;JKO8& zXgh7%IBMz+geS0VqdOdoM-$N#bY?Y`oQOtGO11`w9~{TIFjFUO?l|L;JO?{{eN!v? zUtIsAC1>h?nV#4Gpg*hnALoUnJ;Oy>&5HiVc>P(}|AqGYQR;u>XJqsGU#92vKj@EB z|3h9r{g3;Z`X6*Y{V(&+>wlS^*Z(rTy!v0yHt=<14U@kYvsC?`%l`+jCs1VnF>D|B z(-oTy^^gyS=_b|&0QuzO3tS@d+bAFS^hM literal 0 HcmV?d00001 diff --git a/test-data/hsmf/message_1980.msg b/test-data/hsmf/message_1980.msg new file mode 100644 index 0000000000000000000000000000000000000000..bb295404d048b6c027d406747fc397ae0b829eca GIT binary patch literal 29696 zcmeHQdvIITnLm>3_@UUb;=Jr6%8j83kmza2w&XaGEXj_EU$LEpWNB?#zOhAYOOa%U zq%C!zUD)oMi<%xs6*nZiu}*v_(G7`DS7-65rAJIw4OX=w{>X9+1=ped5Je-MmU3%dzeiST9l0lvNM#KXyNK;{E|i%h>-a9F=lE7SD_VZ^JDv&88#3d@O&#H)!bh^g!IF#!F36CJN5t|nebyq*}3)k!kln!}<^bhVgQ_eh==vqCoi@1(>3-PCj-NX*!%(yGZ z*){OT?Ee>k{gYRYQ2)Q3p2#Drc|J9n% z4)f1H^+NLxo*CwJpi!Vnc#dkM{P<20{P{MtRQv?Z{Slh|<2h#kL7JT~4`=?V_wUV^ z|1sBGkJR~pX8#1&12W^}E6Kd=4}VzgE2#2 zpP+wWF7GB5t^WrpF4qAm%#9x)WRD0w*GHg#h~h(6+D{D1k1tmLz*R}fHUF=LE<>LJ z<;M?-lwXJO7kU@&0eNcCZi-+_M?zm*%+RG5pSzw6Juve;^gmU`c#rWN<3HAkm{%|^ ztK&cB5Q!M=5aT=2K`(&bhWP`sI{vG9W`?+b$e&Gznb&X(opbTIJ#?;xcr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HK`4_J4O0ZM@lUM&@jfH`ghcVf z6jvSpI>>hjK1kR481<7+(HZiAP`<71CvTw$8>4ghzkDMMK1X5hv!wX)Uz@&*;=zY0 zob~|=aPK6Xp*?!~e;e>*ijZFte3sz*l$|F!bvC9%@A(D!w|@I5w(2dV{C7Z!=ZABn zhel5jOQXC Pxq_+w$`WD1@A>}#z(7ju literal 0 HcmV?d00001 diff --git a/test-data/hsmf/message_1981.msg b/test-data/hsmf/message_1981.msg new file mode 100644 index 0000000000000000000000000000000000000000..6833d543472e52382bfcec138e02e2700b6c7694 GIT binary patch literal 29696 zcmeHQdvF`ad0zme_<%_9p%*C$I?;|~Tf&n7Nr0jR5CAD!q)3sJWT{R_5IB*rNCE;t z%2E=CveVj4JB^%~J|>>TbmW<4Je`R>lbJSC*QPyg#($(^#fh8oOdnEXCw9`QWyOu{ zB)0nf_HZOX3AhDm#g)R3^I`A1+uh&o-afwl_PgVSSE?^Q@l5?CwutsH1N-=D8C#Wc zUPs4z;$obuVyr$be|+`oRh%*q)8Pu;L^aUQV)U0{5(~0P3KQ%!9;Gm?r`DhrcLSv| zR-lD2HphQihY~2iPak>we-6nPbn78*Q_c;sAr>dp82!o=rdX81B%Ph+a+2g2-I<+P zm`zEN^=qRRc?X?AJH>ruUCbf0(s_wDVn#SalzWIx5L%Q)gmKlZ?_fHeT7KkvJ@U5R zSG?;h-`AZhQ_7zi2lz=g#YX5i#YWTR9HO!YiJinYIv31Ll68C+({p?aofR!V`f+7C zmm&&3QVT%gT_l$h<5}W#8HMGh--=060al1qpc>!^*Rch ziIEp*3muz?*QC!Oj)RVGBW_BcYe|PZLHY;xn<-}=OLVP~*h$<#yqWkj#4chxac10= zIs6A@X|te{1?W`Yvd3 z|KFZ*UG4uEPfCb0`#;7GC5Nk5)&7rh1O0yoF~;>fiP5JKPsLNysNv4^byZ&J|7uNW zhxzB9Mxpr!&kS=q&?wL(JV!NBetd@r{(Ku+Dt?0I{xHq{@f@@N5Y0}Qhco}w`}btb z|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