RFR: 8274949: Use String.contains() instead of String.indexOf() in java.base
Daniel Fuchs
dfuchs at openjdk.java.net
Fri Oct 8 09:38:04 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.
Changes to java.net look OK. Did you run tier1, tier2?
-------------
Marked as reviewed by dfuchs (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/5559
More information about the core-libs-dev
mailing list