RFR: 8302590: Add String.indexOf(int ch, int fromIndex, int toIndex) [v2]
Raffaello Giulietti
rgiulietti at openjdk.org
Mon Feb 27 09:41:06 UTC 2023
On Mon, 27 Feb 2023 08:00:32 GMT, Viktor Klang <duke at openjdk.org> wrote:
>> (I guess you are referring to the fact that `substring()` can throw.)
>
> @rgiulietti That's surprising, but if it is as you say, then the indexOf with or without the endIndex should behave identically and not throw.
@viktorklang-ora I agree that the behavior w.r.t. out-of-range indices is at odd with the `substring()` family, but this inconsistency is already present since the dawn of time ;-)
-------------
PR: https://git.openjdk.org/jdk/pull/12600
More information about the core-libs-dev
mailing list