https://issues.apache.org/bugzilla/show_bug.cgi?id=51948
Bug #: 51948
Summary: Data written to parts not readable
Product: POI
Version: 3.8-dev
Platform: PC
Status: NEW
Severity: major
Priority: P2
Component: XWPF
AssignedTo: [email protected]
ReportedBy: [email protected]
Classification: Unclassified
Created attachment 27683
--> https://issues.apache.org/bugzilla/attachment.cgi?id=27683
test case
In the attached test case I'm reading a file with a comments part and the try
to change the comments part via commentspart.getOutputStream().
This leads to the execution of PackagePart.getOutputStream(), which will try to
convert a read-only part to a writable part (MemoryPackagePart).
The problem is, that this will have no influence on the parts I get via
doc.getRelations(). So when I later try to read the comments part, it will
serve me the old data, originally read from the file and not what I have
written to it. It will however write the correct data.
I know there are workarounds, but still I'd like to file this as a bug.
IMHO, it's necessary to get rid of the strange conversion done in
PackagePart.getOutputStream(). That really is weird. But that's just my opinion
then. Any ideas? Or am I expecting the wrong thing from POI framework or
misusing the API?
I was using 3.8-beta4
--
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: [email protected]
For additional commands, e-mail: [email protected]