JDK-8240909 : Release Note: Clarify the Specification of ReadableByteChannel.read() and Related Methods
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: java.nio
  • Affected Version: 14
  • Priority: P4
  • Status: Closed
  • Resolution: Delivered
  • Submitted: 2020-03-11
  • Updated: 2020-04-27
  • Resolved: 2020-03-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 14
14Resolved
Description
The specifications of the `DatagramChannel.receive()`, `FileChannel.read(ByteBuffer,long)`, `ReadableByteChannel.read()`, and `ScatteringByteChannel.read()` methods have been updated in this release to specify that an `IllegalArgumentException` is thrown if (any of) the buffer parameter(s) is read-only. This change merely adjusts the specification to match existing long term behavior.