sean.mullan at oracle.com
Mon Jun 27 13:48:44 UTC 2011
On 6/27/11 9:19 AM, Alan Bateman wrote:
> Sean Mullan wrote:
>> Several jigsaw unit tests are failing on Windows because of bug 4715154 
>> which was closed a long time ago as "Will Not Fix". Does anyone have any
>> suggestions as the best way to workaround this, short of replacing the call to
>> FileChannel.map with FileChannel.read? Are there any plans to fix this in the
>>  http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4715154
> This is a limitation of Windows and I'm not aware of any way to create a
> file-mapping that would allow the file be deleted while the mapping exists (if
> there is a way then it would be great to know about it). In a couple of tests
> we've had to do an ugly System.gc() + short sleep at the end of the test to
> trigger the unmap.
It isn't only deleting the file that causes problems. If you try to subsequently
open the file and do other operations on it, they can fail, and we do this when
signing jmod files.
We may be able to avoid calling FileChannel.map. I'm looking more into it ...
More information about the core-libs-dev