On Mon, 16 Sep 2024 15:39:58 GMT, Kevin Walls <kev...@openjdk.org> wrote:

> The few uses of the operation parameter type "JULONG" in Diagnostic Commands 
> should be changed to INT.

Use of the operation parameter type description "JULONG" in Diagnostic Commands 
should be changed to INT.

DiagnosticCommandMBean provides JMX/MBean access to DiagnosticCommands, aka 
jcmds, as JMX Operations 
(https://docs.oracle.com/en/java/javase/22/docs/api/jdk.management/com/sun/management/DiagnosticCommandMBean.html).

Parameter types for the operations are available.  The list of possible types 
for parameters is not specified, it's left as "implementation dependent" (see 
DiagnosticCommandArgumentInfo).  Applications such as JMC have historical prior 
knowledge of the "type" strings to expect.  

But even JMC does not understand "JULONG".  It should be replaced with "INT", 
which most diagnostic commands use for all integer values, mostly (all?) 
unsigned.


The JULONG type name has also appeared in jfrOptionSet.cpp for parsing the 
native FlightRecorderOptions.  This does not get exposed to the MBean, but 
using JULONG/JINT as a type name still looks out of place.  It can be changed 
with no impact.

Tests keep passing: nothing expects or relies on the presence of "JULONG", e.g.


   TEST                                              TOTAL  PASS  FAIL ERROR
   jtreg:test/jdk/com/sun/management/DiagnosticCommandMBean
                                                         4     4     0     0
   jtreg:test/jdk/jdk/jfr                         598   598     0     0

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

PR Comment: https://git.openjdk.org/jdk/pull/21021#issuecomment-2353312884

Reply via email to