Re: RFR: 8287695: Use String.contains() instead of String.indexOf() in jdk.hotspot.agent

2022-06-02 Thread Andrey Turbanov
On Wed, 1 Jun 2022 07:52:50 GMT, Andrey Turbanov wrote: > `String.contains` was introduced in Java 5. > Some code in jdk.hotspot.agent still uses old approach with `String.indexOf` > to check if String contains specified substring. > I propose to migrate such usages. Makes code shorter and easie

Re: RFR: 8287695: Use String.contains() instead of String.indexOf() in jdk.hotspot.agent

2022-06-02 Thread Chris Plummer
On Thu, 2 Jun 2022 09:57:10 GMT, Andrey Turbanov wrote: > > Please make sure you run the SA tests. > > This one, `test/hotspot/jtreg/serviceability` right? You can just do the `test/hotspot/jtreg/serviceability/sa` subdirectory, but there is also `test/jdk/sun/tools/jhsdb` - PR:

Re: RFR: 8287695: Use String.contains() instead of String.indexOf() in jdk.hotspot.agent

2022-06-02 Thread Andrey Turbanov
On Wed, 1 Jun 2022 20:59:41 GMT, Chris Plummer wrote: > Please make sure you run the SA tests. This one, `test/hotspot/jtreg/serviceability` right? - PR: https://git.openjdk.java.net/jdk/pull/8966

Re: RFR: 8287695: Use String.contains() instead of String.indexOf() in jdk.hotspot.agent

2022-06-01 Thread Chris Plummer
On Wed, 1 Jun 2022 07:52:50 GMT, Andrey Turbanov wrote: > `String.contains` was introduced in Java 5. > Some code in jdk.hotspot.agent still uses old approach with `String.indexOf` > to check if String contains specified substring. > I propose to migrate such usages. Makes code shorter and easie

RFR: 8287695: Use String.contains() instead of String.indexOf() in jdk.hotspot.agent

2022-06-01 Thread Andrey Turbanov
`String.contains` was introduced in Java 5. Some code in jdk.hotspot.agent 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. - Commit messages: - [PATCH] Use String.