Skip to content

Conversation

vy
Copy link
Contributor

@vy vy commented Oct 3, 2025

Replace ThreadTracker usage in java.net.URL with ScopedValue and add a test.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8366040: Change URL.lookupViaProviders to use ScopedValue to detect recursive lookup (Enhancement - P4)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 27623

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@vy
Copy link
Contributor Author

vy commented Oct 3, 2025

Passing tier1,2 results are attached to the ticket.

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 3, 2025

👋 Welcome back vyazici! 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 Oct 3, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk
Copy link

openjdk bot commented Oct 3, 2025

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

  • net

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.

@openjdk openjdk bot added the rfr Pull request is ready for review label Oct 3, 2025
@mlbridge
Copy link

mlbridge bot commented Oct 3, 2025

Webrevs

throw new Error("Circular loading of URL stream handler providers detected");
}
try {
return ScopedValue.where(IN_LOOKUP, true).call(() -> {
Copy link
Member

Choose a reason for hiding this comment

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

We should never reach here if the VM is not booted, or if the protocol is file: or jrt: - so it may be safe to use a lambda. The alternative would be to use an anonymous class and create a new Runnable() { ... } but it's probably not needed.

Copy link
Contributor

Choose a reason for hiding this comment

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

The changes to URL look okay but good to run any startup benchmarks to check startup performance.

resultChecker,
TEST_SRC.resolve("circular.provider.template"),
sysProps);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I assume you've re-format the changes to Basic.java to be consistent with this existing code in the test (looks a bit strange on first sighting to see a completely different style being introduced).

Copy link
Member

@Michael-Mc-Mahon Michael-Mc-Mahon 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
net [email protected] rfr Pull request is ready for review
Development

Successfully merging this pull request may close these issues.

4 participants