-
Notifications
You must be signed in to change notification settings - Fork 6.3k
8366040: Change URL.lookupViaProviders to use ScopedValue to detect recursive lookup #27623
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Passing |
👋 Welcome back vyazici! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
throw new Error("Circular loading of URL stream handler providers detected"); | ||
} | ||
try { | ||
return ScopedValue.where(IN_LOOKUP, true).call(() -> { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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); | ||
} |
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Replace
ThreadTracker
usage injava.net.URL
withScopedValue
and add a test.Progress
Issue
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