https://bz.apache.org/bugzilla/show_bug.cgi?id=65304
Bug ID: 65304
Summary: Add commons-io as a dependency
Product: POI
Version: 5.0.x-dev
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P2
Component: POI Overall
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Historically several classes from Commons-IO have been embedded into POI.
Additionally Commons-IO provides a ByteArrayOutputStream which is based on a
list instead of reallocating whole memory chunks.
As a base measurement, I've used the build times on my PC, which are about 3%
faster now (before 577 sec / after 561 sec). Arguably the tests use a lot of
byte juggling and reloading of documents and hence it probably will have less
of an effect on production code.
Although we have the usual suspects on stackoverflow, who still have problems
with collecting the dependencies in the area of dependency managers, one more
dependency - which is kind of a standard dependency - doesn't hurt in my point
of view.
I've mass-replaced the java.io.ByteArrayOutputStream with the unsynchronized
commons counterpart and then went through all the files to check, if
.toInputStream() can be used instead of new
ByteArrayInputStream(...toByteArray()).
I had to exclude the HWPF classes, as those have java.io.BAOS in their API.
Additionally I've cleaned up the usage of AutoClosables and a few incorrect
tests, which haven't updated the test objects after reloading the documents.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]