Integrated: 8347114: JMXServiceURL should require an explicit protocol
Kevin Walls
kevinw at openjdk.org
Mon Jun 16 15:28:37 UTC 2025
On Fri, 6 Jun 2025 15:20:45 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.
This pull request has now been integrated.
Changeset: 9652ae9a
Author: Kevin Walls <kevinw at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/9652ae9a8d48924a90d25e9daffcdb7f582ff503
Stats: 71 lines in 4 files changed: 58 ins; 2 del; 11 mod
8347114: JMXServiceURL should require an explicit protocol
Reviewed-by: dfuchs, sspitsyn
-------------
PR: https://git.openjdk.org/jdk/pull/25674
More information about the serviceability-dev
mailing list