Summary: | Warning 'Entry [trash]/0000.dat is not valid' for valid trash item while opening .xlsx file | ||
---|---|---|---|
Product: | POI | Reporter: | Bernhard Schuhmann <bernhard.schuhmann> |
Component: | OPC | Assignee: | POI Developers List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Mac OS X 10.1 | ||
Attachments: | Excel file with trash item |
Description
Bernhard Schuhmann
2021-11-25 10:41:05 UTC
We are not going to fix every log statement. Can you try configuring log4j to remove the logs you don't like? This is the whole point of logging frameworks. Sure. But pls consider rethinking the log level as unnecessary warnings create noise in the log. And a misconfigured filter in the logging framework could swallow warnings that you might actually want to get. Yes, meaningful logging is less important than getting it running right. But it's still an indication for quality. I personally consider logging an integral part of my software - it's the part ops is using when it's in production. As said earlier - it is not a big issue for us as we have ignored POI logging before, so we don't loose much if we filter those erroneous warnings out. Based on the bit of the ECMA spec, it does seem that trash files are allowed (required?) to ignore all of the normal rules on what is a valid part name and what isn't allowed as a part name Not sure if we need to properly handle them, or just keep quiet about their non-standard naming? The discussion in [1] pointed me to the standard. I read it that these trash items are considered valid content of an ooxml ZIP file and hence I'd assume POI should not warn about it. I'd however be thankful for a log entry on level DEBUG so if something is failing I could enable DEBUG logging and see the warning about the trash item. Not sure how the excel files we use for testing picked up all these trash items. The attached file contains one, I'm now chasing several other regression tests where excel files have more than one trash item. Haven't figured out who is actually using them - but since for instance SharePoint is creating them (see [1], we store our test files in SharePoint), it hopefully should also be _using_ them - but then it's Microsoft... [1] https://social.technet.microsoft.com/Forums/en-US/287650b5-293c-48bc-90ec-9e13a61a46a6/office365-word-document-docx-banned-from-mailer-if-you-edit-properties-online-bug-?forum=sharepointgeneral |