poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 49609] New: Part name comparison in ZipPackage should be case-insensitive
Date Fri, 16 Jul 2010 22:53:28 GMT

           Summary: Part name comparison in ZipPackage should be
           Product: POI
           Version: 3.7-dev
          Platform: Macintosh
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: ebeaty@eragen.com

Created an attachment (id=25777)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25777)
XLSX file that can't be opened with POI 3.7-dev

Attempting to open the attached file fails with the following error:

Exception in thread "main"
org.apache.poi.openxml4j.exceptions.InvalidFormatException: Package should
contain a content type part [M1.13]
    at org.apache.poi.openxml4j.opc.OPCPackage.getParts(OPCPackage.java:588)
    at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:222)

The file opens normally in Microsoft Excel 2008 for Mac.  If the file is saved
as a Microsoft 97 file, POI opens it normally.

The file is from a non-standard source (a scientific instrument that saves its
output as an .xlsx file).  The file contains a part name "[content_types].xml"
(lower case), but the ZipPackage.getPartsImpl method expects the name
"[Content_Types].xml" (mixed case).

The exception is caused by a call to
entry.getName().equals(ContentTypeManager.CONTENT_TYPES_PART_NAME).  According
to the Open Packaging Convention, "Part name equivalence is determined by
comparing part names as case-insensitive ASCII strings."

The bug also occurs in Windows XP.

Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

View raw message