<i18n dev> RFR: 8274949: Use String.contains() instead of String.indexOf() in java.base

Lance Andersen lancea at openjdk.java.net
Fri Oct 8 10:20:09 UTC 2021

On Fri, 17 Sep 2021 08:56:47 GMT, Andrey Turbanov <github.com+741251+turbanoff at openjdk.org> 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.

Marked as reviewed by lancea (Reviewer).


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

More information about the i18n-dev mailing list