RFR: 8279946: (ch) java.nio.channels.FileChannel tryLock and write methods are missing @throws NonWritableChannelException [v2]
Lance Andersen
lancea at openjdk.java.net
Thu Jan 20 19:13:46 UTC 2022
On Thu, 20 Jan 2022 18:06:59 GMT, Lance Andersen <lancea at openjdk.org> wrote:
>> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8279946: Add missing NonReadableChannelException for tryLock(long,long,boolean)
>
> This looks better Brian. Thank you for the update.
>
> Given FileChannel::tryLock() calls the method you updated, shouldn't we also update its javadoc for the relevant exceptions?
> @LanceAndersen Thanks for the comments. I think that for the no-arg `tryLock()` only the `NonWritableChannelException` is relevant as the lock is exclusive, i.e., `shared` is implicitly `false`.
Yes, that I believe is correct from my read as well
-------------
PR: https://git.openjdk.java.net/jdk/pull/7058
More information about the nio-dev
mailing list