RFR: 8221397 Support implementation-defined Map Modes
Alan Bateman
Alan.Bateman at oracle.com
Thu Apr 4 19:47:45 UTC 2019
On 03/04/2019 10:10, Andrew Dinn wrote:
> :
> I still have two undecided points you might advise on:
>
> Does the javadoc for FileChannel.map and/or FileChannelImpl.map need
> updating to record the possibility that UOE might be thrown?
I don't think I understand your question about FileChannel.map as you've
already got @throws UOE in the patch.
FileChannelImpl.map is JDK internal/implementation so nothing to do
there (beyond the implementation change that you already have).
>
> Do I need to update any other implementations of map to cater for the
> possibility of user-defined map modes?
>
No, the there shouldn't be anywhere else that needs updating.
I looked through webrev.01. The package description has a catch-all for
NPE so you need to specify that in each method. In the constructor it
would be better to check for length 0 before assigning name (and of
course name.length will throw NPE so you get that check for free). The
test looks okay although I would probably catch the specific exceptions
rather than catching Exception and catching them later but it amounts to
the same checking.
-Alan.
More information about the nio-dev
mailing list