RFR: 8347114: JMXServiceURL with null protocol defaults to jmxmp

Kevin Walls kevinw at openjdk.org
Fri Jun 6 15:29:28 UTC 2025


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 cliennt stubs.  There is no need for JMXMP to be mentioned here.

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

Commit messages:
 - typo
 - 8347114: JMXServiceURL with null protocol defaults to jmxmp

Changes: https://git.openjdk.org/jdk/pull/25674/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=25674&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8347114
  Stats: 13 lines in 3 files changed: 0 ins; 2 del; 11 mod
  Patch: https://git.openjdk.org/jdk/pull/25674.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/25674/head:pull/25674

PR: https://git.openjdk.org/jdk/pull/25674


More information about the serviceability-dev mailing list