AsynchronousFileChannel#lock() method throws NullPointerException
Alan Bateman
Alan.Bateman at Sun.COM
Wed Apr 30 10:14:18 PDT 2008
Umashankar wrote:
> Hi Alan,
> I noticed that on Solaris and Linux,
> AsynchronousFileChannel.lock() method throws NullPointerException, if
> the channel is closed asynchronously
> while the lock is still being acquired.
Thanks Umashankar; you are correct. The bug is specific to platforms
where the "portable" implementation of AsynchronousFileChannel is used.
It's been on my list to fix for some time but I neglected to list it in
the known bugs list. FWIW, it's the same issue that is 6429910 and a few
others. The failure mode varies and the reason it's been around for so
long is because it hasn't been feasible to completely fix it on Windows.
The AsynchronousFileChannel on Windows is a different implementation and
so doesn't run into this issue. I'll put time into this after JavaOne as
we need the asynchronous close to be very reliable.
-Alan.
More information about the nio-dev
mailing list