Integrated: 8274949: Use String.contains() instead of String.indexOf() in java.base
Andrey Turbanov
duke at openjdk.java.net
Fri Nov 19 18:51:17 UTC 2021
On Fri, 17 Sep 2021 08:56:47 GMT, Andrey Turbanov <duke at openjdk.java.net> wrote:
> String.contains was introduced in Java 5.
> Some code in java.base still uses old approach with `String.indexOf` to check if String contains specified substring.
> I propose to migrate such usages. Makes code shorter and easier to read.
This pull request has now been integrated.
Changeset: 66775543
Author: Andrey Turbanov <turbanoff at gmail.com>
Committer: Roger Riggs <rriggs at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/6677554374ade32c9f2ddaaa093064de8aebd831
Stats: 38 lines in 17 files changed: 0 ins; 3 del; 35 mod
8274949: Use String.contains() instead of String.indexOf() in java.base
Reviewed-by: weijun, dfuchs, vtewari, lancea
-------------
PR: https://git.openjdk.java.net/jdk/pull/5559
More information about the core-libs-dev
mailing list