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 2016/05/26 06:40:57 UTC
[Bug 59634] XSSFWorkbook#close() violates contract from
Workbook#close()
https://bz.apache.org/bugzilla/show_bug.cgi?id=59634
--- Comment #1 from Michael <mi...@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-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
Re: [Bug 59634] XSSFWorkbook#close() violates contract from Workbook#close()
Posted by Dominik Stadler <do...@gmx.at>.
+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 <mu...@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: bugzilla@apache.org [mailto:bugzilla@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 <mi...@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-unsubscribe@poi.apache.org For additional
> commands, e-mail: dev-help@poi.apache.org
>
>
RE: [Bug 59634] XSSFWorkbook#close() violates contract from
Workbook#close()
Posted by "Murphy, Mark" <mu...@metalexmfg.com>.
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: bugzilla@apache.org [mailto:bugzilla@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 <mi...@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-unsubscribe@poi.apache.org For additional commands, e-mail: dev-help@poi.apache.org