poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominik Stadler <dominik.stad...@gmx.at>
Subject Re: [Bug 59634] XSSFWorkbook#close() violates contract from Workbook#close()
Date Fri, 27 May 2016 19:25:12 GMT
+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 <murphymdev@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 <michael.holtermann@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
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message