From e1c059bde81a1d8485cfbb4cfb558bf3529904f9 Mon Sep 17 00:00:00 2001 From: Nick Burch Date: Sun, 10 Feb 2008 21:54:13 +0000 Subject: [PATCH] Test for bug #42564 - appears to already be fixed git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@620341 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/poi/hssf/data/42564.xls | Bin 0 -> 13824 bytes .../apache/poi/hssf/usermodel/TestBugs.java | 20 ++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 src/testcases/org/apache/poi/hssf/data/42564.xls diff --git a/src/testcases/org/apache/poi/hssf/data/42564.xls b/src/testcases/org/apache/poi/hssf/data/42564.xls new file mode 100644 index 0000000000000000000000000000000000000000..dff150e2dcaca80a308d5d319f9e02ee6b80fd80 GIT binary patch literal 13824 zcmeHOTWlOx89r-oZnO=}^^_(}Pn_0GQrpa4?IlfT5?Q|R4P1+{7+}i6SC_5GYcgTAq;L1qmb`+M4e>GdsH(Z-N`D zC@nkD+2j9mZvX$C|C~8<@`vB=dgqm2KKQPPJWq;V@xl5Iv9*mKYx`T=FT`g+llQ^; z`Z`7Y8-I46kC6q=3m5>-G{Uj>C;FE0b&=@Zlpa(dy)1b?MISG4VKyFkLL@i#Rd{sJFd5;>6- zBCl#@-L5U!R!Pm+MbE9dOLg_k(vn@Ya%#S2d8)%Rsw+Dg>%nWmPw@9nye<%E*s$Su zkN*7yq(YnoZ#gz4emZ*Y_y}meNL=hWtu?-@fBW?BPW;BiuXUNXH79{B##_)||H}7> zWA&|T@z|@D@#URMfBKOxi$V4}8|fhHxkb6&Ta>$1dvR=%*q2y`_TsR?M%khGK}5!Mx{Q?Sj?@K(vWduJ)jT8AH$sP zi)wACO{<;|$Lah9zbnU;?%Bd%vu`a%sL?mr2l>L_>4m{V@d0s6JjUWJ#Y=5}lYfK$ zm>3XGMw>%NHniyT+8aG}s?}^-JT5-l)@-wepcl=;y75-Icl6d(h<~jsK&AP-p~xq& zH2Ko%0G4!{=iN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@r_;~z7*SB3`px3%bSfawrS`ECi%qt450nUo;!2Pu-nSrYJvX%ooMCK literal 0 HcmV?d00001 diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java b/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java index 590ec4943c..616ec8b1f6 100644 --- a/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java +++ b/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java @@ -1010,6 +1010,26 @@ extends TestCase { assertTrue("No Exceptions while reading file", true); } + /** + * Bug 42564: Some files from Acess were giving a RecordFormatException + * when reading the BOFRecord + */ + public void test42564() throws Exception { + FileInputStream in = new FileInputStream(new File(cwd, "42564.xls")); + HSSFWorkbook wb = new HSSFWorkbook(in); + in.close(); + + assertTrue("No Exceptions while reading file", true); + + //serialize and read again + ByteArrayOutputStream out = new ByteArrayOutputStream(); + wb.write(out); + out.close(); + + wb = new HSSFWorkbook(new ByteArrayInputStream(out.toByteArray())); + assertTrue("No Exceptions while reading file", true); + } + /** * Bug 42618: RecordFormatException reading a file containing * =CHOOSE(2,A2,A3,A4) -- 2.39.5