Missing specialization in CharBufferR.put(String, int, int)

Philippe Marschall kustos at gmx.net
Thu Apr 29 18:47:58 UTC 2021


Hello

CharBufferR.put(String, int, int) seems to be the only put* method in
CharBufferR that doesn't unconditionally throw ReadOnlyBufferException
but instead copies the superclass implementation.
This seems to have been introduced with JDK-8011135.

I think this would be relatively easy to fix in
Heap-X-Buffer.java.template by means of #if[rw] #else[rw]
similar to all the other put* methods.

If you agree this is a bug and should be fixed then I can come up with a
PR if somebody creates a JIRA.

  [1] https://bugs.openjdk.java.net/browse/JDK-8011135

Cheers
Philippe


More information about the nio-dev mailing list