Re: RFR: 8265796: vmTestbase/nsk/jdi/ObjectReference/referringObjects/referringObjects002/referringObjects002.java fails when running with the fix for JDK-6824466 [v2]

2021-11-16 Thread Leonid Mesnik
On Tue, 16 Nov 2021 02:45:13 GMT, Leonid Mesnik wrote: >> The nsk.share.jdi.TestClass1 is used via reflection. The reflective call >> creates MethodHandle and one more reference to TestClass1. So the number of >> expected references should be incremented. Thanks to @plummercj and >> @mlchung

Re: RFR: 8265796: vmTestbase/nsk/jdi/ObjectReference/referringObjects/referringObjects002/referringObjects002.java fails when running with the fix for JDK-6824466 [v2]

2021-11-16 Thread Mandy Chung
On Tue, 16 Nov 2021 02:45:13 GMT, Leonid Mesnik wrote: >> The nsk.share.jdi.TestClass1 is used via reflection. The reflective call >> creates MethodHandle and one more reference to TestClass1. So the number of >> expected references should be incremented. Thanks to @plummercj and >> @mlchung

Integrated: 8274757: Cleanup unnecessary calls to Throwable.initCause() in java.management module

2021-11-16 Thread Andrey Turbanov
On Thu, 16 Sep 2021 20:45:36 GMT, Andrey Turbanov wrote: > Pass cause exception as constructor parameter is shorter and easier to read. This pull request has now been integrated. Changeset: 1c45c8a0 Author:Andrey Turbanov Committer: Serguei Spitsyn URL: https://git.openjdk.java.net

Integrated: 8274662: Replace 'while' cycles with iterator with enhanced-for in jdk.hotspot.agent

2021-11-16 Thread Andrey Turbanov
On Wed, 22 Sep 2021 08:58:01 GMT, Andrey Turbanov wrote: > There are few places in code where manual `while` loop is used with Iterator > to iterate over Collection. > Instead of manual `while` cycles it's preferred to use _enhanced-for_ cycle > instead: it's less verbose, makes code easier to

Integrated: 8274163: Use String.equals instead of String.compareTo in jdk.jcmd

2021-11-16 Thread Andrey Turbanov
On Wed, 22 Sep 2021 19:14:03 GMT, Andrey Turbanov wrote: > In several places, String.compareTo was _compared_ with 0 ( via `== 0` or `!= > 0`). > Instead of this, we can use String.equals calls. `String.equals` is faster > and shorter. This pull request has now been integrated. Changeset: 962

Integrated: 8274190: Use String.equals instead of String.compareTo in jdk.internal.jvmstat

2021-11-16 Thread Andrey Turbanov
On Wed, 22 Sep 2021 19:20:35 GMT, Andrey Turbanov wrote: > In several places, String.compareTo was _compared_ with 0 ( via `== 0` or `!= > 0`). > Instead of this, we can use String.equals calls. `String.equals` is faster > and shorter. This pull request has now been integrated. Changeset: 0bc

Integrated: 8274168: Avoid String.compareTo == 0 to check String equality in java.management

2021-11-16 Thread Andrey Turbanov
On Wed, 22 Sep 2021 20:39:51 GMT, Andrey Turbanov wrote: > Cleanup places, where String.compareTo is used to check String's equality. > Instead String.equals or switch expression could be used. They are faster and > code is cleaner. This pull request has now been integrated. Changeset: a9cb8bd

Integrated: 8274261: Use enhanced-for instead of plain 'for' in jdk.jcmd

2021-11-16 Thread Andrey Turbanov
On Fri, 24 Sep 2021 07:30:02 GMT, Andrey Turbanov wrote: > There are few places in code where manual `for` loop is used with Iterator to > iterate over Collection or Array. > Instead of manual `for` cycles it's preferred to use enhanced-for cycle > instead: it's less verbose, makes code easier

Integrated: JDK-8277029: JMM GetDiagnosticXXXInfo APIs should verify output array sizes

2021-11-16 Thread Thomas Stuefe
On Fri, 12 Nov 2021 08:25:04 GMT, Thomas Stuefe wrote: > jmm_GetDiagnosticCommandArgumentsInfo and jmm_GetDiagnosticCommandInfo are > used to query the hotspot about diagnostic commands. They provide output > arrays for the information: > > > void jmm_GetDiagnosticCommandArgumentsInfo(JNIEnv

Re: RFR: JDK-8277029: JMM GetDiagnosticXXXInfo APIs should verify output array sizes [v2]

2021-11-16 Thread Thomas Stuefe
On Tue, 16 Nov 2021 06:26:08 GMT, Thomas Stuefe wrote: >> jmm_GetDiagnosticCommandArgumentsInfo and jmm_GetDiagnosticCommandInfo are >> used to query the hotspot about diagnostic commands. They provide output >> arrays for the information: >> >> >> void jmm_GetDiagnosticCommandArgumentsInfo(J