RFR: 8343110: Add getChars(int, int, char[], int) to CharSequence and CharBuffer [v5]

Chen Liang liach at openjdk.org
Wed Apr 16 14:45:46 UTC 2025


On Wed, 16 Apr 2025 10:41:48 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Any quick proposals how to rephrase JavaDocs and CSR? As the CSR is already reviewed I am a bit reluctant to hold the train for this, as IMHO *masses* of classes and interfaces would need such a disclaimer, if we kick-off that ball here...
>
> I think Roger's suggestion is for a different JBS issue / PR / CSR.

Yeah, we already added this API to allow implementations to be more consistent under race condition. So for changing char sequences, this method's default implementation can throw IOOBE, but it is already specified so it is well-behaved even under race (as you can argue a read observed the shorter state of the CS that causes the failure)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21730#discussion_r2047095624


More information about the nio-dev mailing list