You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2011/10/04 11:32:25 UTC
DO NOT REPLY [Bug 51948] New: Data written to parts not readable
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: dev@poi.apache.org
ReportedBy: bernd.fuhrmann@stm-media.de
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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org