RFR: 8274949: Use String.contains() instead of String.indexOf() in java.base
Vyom Tewari
vtewari at openjdk.java.net
Fri Oct 8 10:15:07 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.
java.net changes look OK to me.
-------------
Marked as reviewed by vtewari (Committer).
PR: https://git.openjdk.java.net/jdk/pull/5559
More information about the core-libs-dev
mailing list