RFR: 8310816: GcInfoBuilder float/double signature mismatch

David Holmes dholmes at openjdk.org
Fri Jun 23 21:41:03 UTC 2023


On Fri, 23 Jun 2023 18:10:59 GMT, Kevin Walls <kevinw at openjdk.org> wrote:

> Simple typo in a signature which is passed to JNU_NewObjectByName.  The method clearly intentds to pass Float, but uses Double.
> 
> This code is probably not invoked, unless there is a GC MXBean with such fields.  I see no straightforward way of testing this explicitly, but the change is tiny.
> 
> All tests in test/jdk/com/sun/management still pass.

Seems an obvious copy'n'paste error, but would result in a null entry in the array.

I can't figure out how this code is triggered by `getLastGcInfo0` so can't say how to test it either.

Hard to imagine removing a null could cause a problem for code accessing the resulting array, so it seems safe in that regard.

Thanks.

-------------

Marked as reviewed by dholmes (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/14631#pullrequestreview-1496074434


More information about the serviceability-dev mailing list