RFR: 8347114: JMXServiceURL should require an explicit protocol [v2]
Kevin Walls
kevinw at openjdk.org
Mon Jun 16 15:48:36 UTC 2025
On Mon, 9 Jun 2025 15:22:17 GMT, Kevin Walls <kevinw at openjdk.org> wrote:
>> Remove the historic oddity that JMXServiceURL defaults to jmxmp if a null protocol is specified.
>>
>> This has been the case for JMXServiceURL constructors that take individual parameters, but not for JMXServiceURL(String serviceURL), which enforces that there must be a protocol (If empty in the String, it throws: java.net.MalformedURLException: Missing or invalid protocol name: "")
>>
>> A missing (null) protocol should throw a MalformedURLException for all constructors.
>>
>> JMXMP was never part of the JDK, but a separate component in the historic JMX Remote reference implementation.
>>
>> While we are here, remove the last remaining JMXMP references in the source:
>>
>> src/java.management/share/classes/javax/management/remote/JMXConnectorServerMBean.java: * (JMXMP Connector and RMI Connector).</p>
>> src/java.management/share/classes/javax/management/remote/JMXConnectorServer.java: * (JMXMP Connector and RMI Connector).</p>
>>
>> These doc references are just examples of Connectors that support generation of client stubs. There is no need for JMXMP to be mentioned here.
>
> Kevin Walls has updated the pull request incrementally with one additional commit since the last revision:
>
> Add test
Release note updated.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/25674#issuecomment-2977145963
More information about the serviceability-dev
mailing list