+1, close() is the final thing you do on objects based on the Closeable
interface, I am surprised the javadoc for Workbook states it differently.

If we want to have a way to "release" resources while still having the
object available, we should use a differently named method for this as
close() is very much Java-standard and many developers will expect it to
behave in this way.

Dominik.

On Fri, May 27, 2016 at 1:44 PM, Murphy, Mark <murphym...@metalexmfg.com>
wrote:

> This seems a little counterintuitive to me. I would expect that once a
> Workbook is closed, it cannot be used. Closing should be the last thing you
> do with a Workbook. I would be more inclined to fix the documentation than
> to allow differing behavior between Workbooks read from the file system,
> and newly created workbooks.
>
> -----Original Message-----
> From: bugzi...@apache.org [mailto:bugzi...@apache.org]
> Sent: Thursday, May 26, 2016 2:41 AM
> To: dev@poi.apache.org
> Subject: [Bug 59634] XSSFWorkbook#close() violates contract from
> Workbook#close()
>
> https://bz.apache.org/bugzilla/show_bug.cgi?id=59634
>
> --- Comment #1 from Michael <michael.holterm...@dfb-medien.de> --- In
> addition it's not possible to read from the workbook after it has been
> closed. A NPE will be thrown.
>
> --
> You are receiving this mail because:
> You are the assignee for the bug.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional
> commands, e-mail: dev-h...@poi.apache.org
>
>

Reply via email to