https://bz.apache.org/bugzilla/show_bug.cgi?id=60234

            Bug ID: 60234
           Summary: Regression: XSSFWorkBook#<init>() throws unexpected
                    exception in 3.15 for invalid input
           Product: POI
           Version: 3.15-FINAL
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
          Assignee: dev@poi.apache.org
          Reporter: andreas.k...@gmail.com

We have a piece of code that essentially does this:

try {
  new XSSFWorkbook(new ByteArrayInputStream("garbage".getBytes());
} catch (POIXMLException e) {
  // Ok, guess it wasn't OOXML, so try something else.
  // ...
}

This worked fine in 3.14 and before. After I updated to 3.15 it fails, because
we're now seeing a
'org.apache.poi.openxml4j.exceptions.NotOfficeXmlFileException' instead:

org.apache.poi.openxml4j.exceptions.NotOfficeXmlFileException: No valid entries
or contents found, this is not a valid OOXML (Office Open XML) file
    at
org.apache.poi.openxml4j.opc.ZipPackage.getPartsImpl(ZipPackage.java:290)
    at org.apache.poi.openxml4j.opc.OPCPackage.getParts(OPCPackage.java:774)
    at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:344)
    at org.apache.poi.util.PackageHelper.open(PackageHelper.java:37)
    at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:285)
    at ...

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to