RFR: 8286735: (fc) FileChannel#map should document behavior when using custom file systems

Uwe Schindler uschindler at openjdk.java.net
Thu May 19 14:06:49 UTC 2022


On Wed, 18 May 2022 20:53:26 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> src/java.base/share/classes/java/nio/channels/FileChannel.java line 962:
>> 
>>> 960:      *
>>> 961:      * @throws UnsupportedOperationException
>>> 962:      *         If an unsupported map mode is specified, or if the implementation
>> 
>> If you don't agree that the spec should be changed for the old API spec, let's remove that statement and only fix the new method's documentation.
>
>> If you don't agree that the spec should be changed for the old API spec, let's remove that statement and only fix the new method's documentation.
> 
> If we were to add the proposed `@implSpec`, then I don't think the `@throws UnsupportedOperationException` verbiage for `map(MapMode, long, long, MemorySession)` would need to be tweaked as the UOE is always thrown. If that would be acceptable, then perhaps the present issue could be revised and another separate issue created to address the optionality concerns that Alan raised, if that is something which it is desirable to investigate separately.

I havo no strong preference where the information about this implemnation detail is written down.

I agree to change the original issue and add a new one about optionality.

-------------

PR: https://git.openjdk.java.net/jdk/pull/8739


More information about the nio-dev mailing list