On Tue, 11 Mar 2025 09:04:59 GMT, Matthias Baesken <[email protected]> wrote:
>> On Linux there are some special settings for LIBMANAGEMENT_OPTIMIZATION that
>> are most likely not needed any more and could be removed.
>
> Matthias Baesken has updated the pull request incrementally with one
> additional commit since the last revision:
>
> Bring back comment
src/java.management/share/native/libmanagement/VMManagementImpl.c line 63:
> 61: {
> 62: jmmOptionalSupport mos;
> 63: jmm_interface->GetOptionalSupport(env, &mos);
Is it worth making any change here?
We currently ignore the return value from GetOptionalSupport, and no doubt have
done for years.
So is the fix to just not record the return value, or should we check it?
Making a change to not capture the return value looks like a statement that it
should never be checked. Even if GetOptionalSupport "can't" really fail with
the current implementation, that doesn't seem like the right hint to leave.
Other usage in
Java_com_sun_management_internal_DiagnosticCommandImpl_getDiagnosticCommandInfo
also does:
jint ret = jmm_interface_management_ext->GetOptionalSupport(env, &mos);
...and also doesn't check the return value.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23966#discussion_r1989081708