XMLWordPrintable

    • generic
    • generic
    • Verified

      `ReadableByteChannel::read` no longer incorrectly throws `ReadOnlyBufferException`.

      The `read(ByteBuffer)` method of the `ReadableByteChannel` returned by `java.nio.channels.Channel.newChannel(InputStream)` was incorrectly throwing `ReadOnlyBufferException` when its `ByteBuffer` parameter specified a read-only buffer. `ReadableByteChannel::read` is, however, specified in this case to throw an `IllegalArgumentException`. The implementation has been changed for this case to throw an `IllegalArgumentException` instead of a `ReadOnlyBufferException`, as dictated by the specification.

            bpb Brian Burkhalter
            bpb Brian Burkhalter
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: