On Mon, 27 Feb 2023 08:00:32 GMT, Viktor Klang <d...@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

Reply via email to