RFR: 4842457: (bf spec) Clarify meaning of "(optional operation)"

Brian Burkhalter bpb at openjdk.org
Tue Mar 21 19:19:43 UTC 2023


On Tue, 21 Mar 2023 18:26:10 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Add some clarifying verbiage about optional operations to the type-specific buffer classes.
>
> src/java.base/share/classes/java/nio/X-Buffer.java.template line 269:
> 
>> 267:  * however, instead throw an {@linkplain UnsupportedOperationException} if the
>> 268:  * $Type$Buffer is not backed by an {@linkplain Buffer#hasArray accessible
>> 269:  * $type$ array} irrespective of whether the $Type$Buffer is read-only.
> 
> This mostly looks okay but I think it would be clearer to drop "however, instead"  and put "irrespective ..." in parentheses.

I thought "however, instead" a bit clunky as well; will update.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13123#discussion_r1143886924


More information about the nio-dev mailing list