[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    Integrated: 8283800: Simplify String.indexOf/lastIndexOf calls
From:       Andrey Turbanov <aturbanov () openjdk ! java ! net>
Date:       2022-03-30 7:11:38
Message-ID: LppxPt1EP5pplExoq4_m0P_Iy6hMhbq3iej33Yf7r1Y=.7908d94a-005a-4930-8ee7-5cd21f575591 () github ! com
[Download RAW message or body]

On Sun, 20 Mar 2022 12:45:34 GMT, Andrey Turbanov <aturbanov@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 <aturbanov@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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic