Skip to content

Conversation

@kevinjwalls
Copy link
Contributor

@kevinjwalls kevinjwalls commented Jun 6, 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 client stubs. There is no need for JMXMP to be mentioned here.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change requires CSR request JDK-8359130 to be approved
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issues

  • JDK-8347114: JMXServiceURL should require an explicit protocol (Enhancement - P4)
  • JDK-8359130: JMXServiceURL should require an explicit protocol (CSR)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/25674/head:pull/25674
$ git checkout pull/25674

Update a local copy of the PR:
$ git checkout pull/25674
$ git pull https://git.openjdk.org/jdk.git pull/25674/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 25674

View PR using the GUI difftool:
$ git pr show -t 25674

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/25674.diff

Using Webrev

Link to Webrev Comment

@kevinjwalls
Copy link
Contributor Author

/csr

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 6, 2025

👋 Welcome back kevinw! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Jun 6, 2025

@kevinjwalls This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8347114: JMXServiceURL should require an explicit protocol

Reviewed-by: dfuchs, sspitsyn

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 112 new commits pushed to the master branch:

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the csr Pull request needs approved CSR before integration label Jun 6, 2025
@openjdk
Copy link

openjdk bot commented Jun 6, 2025

@kevinjwalls has indicated that a compatibility and specification (CSR) request is needed for this pull request.

@kevinjwalls please create a CSR request for issue JDK-8347114 with the correct fix version. This pull request cannot be integrated until the CSR request is approved.

@openjdk
Copy link

openjdk bot commented Jun 6, 2025

@kevinjwalls The following label will be automatically applied to this pull request:

  • serviceability

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@kevinjwalls kevinjwalls marked this pull request as ready for review June 6, 2025 15:24
@openjdk openjdk bot added the rfr Pull request is ready for review label Jun 6, 2025
@mlbridge
Copy link

mlbridge bot commented Jun 6, 2025

Webrevs

@kevinjwalls
Copy link
Contributor Author

(Test was missing from original commit.)

@dfuch
Copy link
Member

dfuch commented Jun 10, 2025

This change introduces a potential compatibility with application that may be using third-party implementations of the JMXMP protocol. I do not believe JMXMP is widely used, but I could be wrong. I agree that defaulting to the "jmxmp" protocol when null is supplied is odd, since the only standard (non optional) connector is the RMI Connector. Changing the specification and behaviour looks therefore a desirable cleanup.
I see that you have planned a CSR, which is good. Make sure to also add a release note.

@kevinjwalls
Copy link
Contributor Author

Thanks Daniel, yes there is a possibility of flushing out some niche dependencies on the odd behaviour, will go ahead with CSR and release note.

@kevinjwalls kevinjwalls changed the title 8347114: JMXServiceURL with null protocol defaults to jmxmp 8347114: JMXServiceURL should require an explicit protocol Jun 10, 2025
@kevinjwalls
Copy link
Contributor Author

CSR detail added.

Copy link
Contributor

@sspitsyn sspitsyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@kevinjwalls
Copy link
Contributor Author

Thanks Serguei!

@openjdk openjdk bot added ready Pull request is ready to be integrated and removed csr Pull request needs approved CSR before integration labels Jun 16, 2025
@kevinjwalls
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Jun 16, 2025

Going to push as commit 9652ae9.
Since your change was applied there have been 112 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jun 16, 2025
@openjdk openjdk bot closed this Jun 16, 2025
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jun 16, 2025
@openjdk
Copy link

openjdk bot commented Jun 16, 2025

@kevinjwalls Pushed as commit 9652ae9.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@kevinjwalls
Copy link
Contributor Author

Release note updated.

@sspitsyn
Copy link
Contributor

sspitsyn commented Jun 17, 2025

Release note updated.

Somehow I do not see a release note associated with this bug.
Do you mean this sub-task: https://bugs.openjdk.org/browse/JDK-8359700 ?

@kevinjwalls
Copy link
Contributor Author

Yes that's right, the release note text in the subtask.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integrated Pull request has been integrated serviceability [email protected]

Development

Successfully merging this pull request may close these issues.

3 participants