poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 60102] Unable to write XWPFDocument opened from Http InputStream
Date Sat, 10 Sep 2016 10:01:23 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=60102

kenneth_lau@yahoo.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|NEEDINFO                    |RESOLVED

--- Comment #2 from kenneth_lau@yahoo.com ---
I've debugged into the issue further. The problem is reproduced after the
OutputStream is closed by mistake after the first write.

Change test case test60102() to following --


// Write out to a file
    File outfile = TempFile.createTempFile("60102-resaved", "docx");
    OutputStream fos = new FileOutputStream(outfile);
    doc.write(fos);
    fos.close();
    doc.write(fos);


The second doc.write(fos) failed because OutputStream was closed by mistake.

The exception message was misleading. However, I've consider this is a usage
error.

-- 
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


Mime
View raw message