On Thu, 24 Mar 2022 13:00:12 GMT, Jorn Vernee <[email protected]> wrote:
>> Maurizio Cimadamore has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Drop redundant javadoc statements re. handling of nulls
>> (handling of nulls is specified once and for all in the package javadoc)
>
> src/java.base/share/classes/sun/nio/ch/FileChannelImpl.java line 1071:
>
>> 1069: sessionImpl.checkValidStateSlow();
>> 1070: if (offset < 0) throw new IllegalArgumentException("Requested
>> bytes offset must be >= 0.");
>> 1071: if (size < 0) throw new IllegalArgumentException("Requested
>> bytes size must be >= 0.");
>
> The javadoc also says that IAE will be thrown if `offset + size < 0` I think
> to guard against overflow, but I don't see that checked here. Is it missing?
`mapInternal` in FileChannelImpl takes care of that for both flavors of `map`
-------------
PR: https://git.openjdk.java.net/jdk/pull/7888