On Mon, 27 Feb 2023 13:38:59 GMT, Raffaello Giulietti <rgiulie...@openjdk.org> wrote:
>> Parking this PR while exploration is done into other options is okay. > > @AlanBateman Both from an `@apiNote` and from an implementation perspective, > the checked _some-prefix_`IndexOf()`variants would better make use of the > public 3 params `indexOf()` API point proposed here, rather than relying on > `StringLatin1` and `StringUTF16` internals. > > Thus, parking this PR would mean that the other PR could not refer to the API > point from here until this one is integrated. > > Perhaps I'm missing something. > Is it perhaps better to add the checked variants directly in this PR? The suggestion is to write down some alternatives to the 3-arg indexOf method and work through some examples to see if they are less error prone. It might be that you decide to move forward with the current proposal or it might be that you decide a different method would help avoid some common mistakes. ------------- PR: https://git.openjdk.org/jdk/pull/12600