poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Burch <apa...@gagravarr.org>
Subject Re: NPOIFS write support - please test!
Date Wed, 21 May 2014 16:58:38 GMT
On Sun, 4 May 2014, Andreas Beeker wrote:
> I think the problem is described here:
> http://stackoverflow.com/questions/3602783/file-access-synchronized-on-java-object
> When playing around with closing and then setting the NPOIFSFileSystem 
> handle ("fs") to null and calling the garbage collector afterwards, has 
> interesting result, i.e. suddenly I'll get a null pointer where the 
> reference should be still initialized ... but up till now, the failing 
> junit test only works while debugging it ...

Maybe we should change the logic slightly in the test? Currently it does 
something like:

  * Open temp file
  * Write
  * Close
  * Open again

Instead, for windows compatability, how about we did

  * Open temp file
  * Write
  * Close
  * Copy to new temp file
  * Open new copied temp file

That would still seem to let us test open/write/re-open, but hopefully 
without the windows "re-open too soon" clash?


To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org

View raw message