You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ce...@apache.org on 2024/11/30 09:36:20 UTC

svn commit: r1922231 - /poi/trunk/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFVMLDrawing.java

Author: centic
Date: Sat Nov 30 09:36:20 2024
New Revision: 1922231

URL: http://svn.apache.org/viewvc?rev=1922231&view=rev
Log:
Expect an XML parser error in one test when running with IBM JDK

Modified:
    poi/trunk/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFVMLDrawing.java

Modified: poi/trunk/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFVMLDrawing.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFVMLDrawing.java?rev=1922231&r1=1922230&r2=1922231&view=diff
==============================================================================
--- poi/trunk/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFVMLDrawing.java (original)
+++ poi/trunk/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFVMLDrawing.java Sat Nov 30 09:36:20 2024
@@ -48,6 +48,7 @@ import com.microsoft.schemas.vml.STStrok
 import com.microsoft.schemas.vml.impl.CTShapetypeImpl;
 import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream;
 import org.apache.poi.POIDataSamples;
+import org.apache.poi.ooxml.POIXMLException;
 import org.apache.xmlbeans.XmlException;
 import org.apache.xmlbeans.XmlObject;
 import org.apache.xmlbeans.XmlOptions;
@@ -218,6 +219,9 @@ class TestXSSFVMLDrawing {
     void testInvalidFile() throws IOException {
         try (XSSFWorkbook workbook = openSampleWorkbook("clusterfuzz-testcase-minimized-POIXSSFFuzzer-5089447305609216.xlsx")) {
             assertNotNull(workbook);
+        } catch (POIXMLException e) {
+            // XML parser of IBM JDK is a bit more picky on XML in this file, so we expect it to fail there with this error
+            assertTrue(e.getMessage().contains("Attribute name \"sheetId\" associated with an element type \"sheet\" must be followed by the ' = ' character."));
         }
     }
 }
\ No newline at end of file



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