On Sun, 20 Mar 2022 12:45:34 GMT, Andrey Turbanov <aturba...@openjdk.org> wrote:

> In a few places String.indexOf/lastIndexOf methods are called with default 
> parameter for index: `0` for `indexOf`, length() for `lastIndexOf`.
> I propose to cleanup such calls. It makes code a bit easier to read. In case 
> of `indexOf` it even could be faster, as there is separate intrinsic for 
> `indexOf` call without index argument.

This pull request has now been integrated.

Changeset: 9bb916db
Author:    Andrey Turbanov <aturba...@openjdk.org>
URL:       
https://git.openjdk.java.net/jdk/commit/9bb916db0a6af2c6476c0bfbc55c1bb8721b4354
Stats:     14 lines in 6 files changed: 0 ins; 0 del; 14 mod

8283800: Simplify String.indexOf/lastIndexOf calls

Reviewed-by: xuelei, bpb, lmesnik

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

PR: https://git.openjdk.java.net/jdk/pull/7877

Reply via email to