-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
8297976: Remove sun.net.ProgressMonitor and related classes #11474
Conversation
/issue add 8240275 |
👋 Welcome back djelinski! A progress list of the required criteria for merging this PR into |
@djelinski |
@djelinski The following labels will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command. |
Webrevs
|
JDK-8240275 seems to have a reproducer attached. Did you investigate whether turning that into a non-regression test would be worthwhile? Otherwise this looks like a good cleanup and simplification! |
src/java.base/share/classes/sun/net/www/http/KeepAliveStream.java
Outdated
Show resolved
Hide resolved
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 to me (apart from Daniel's question).
As you note, these are internal classes and aren't exported from the java.base module (to applications) and given the context in which those classes were used, my understanding is that we won't need a CSR for this change.
@djelinski 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:
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 104 new commits pushed to the
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 |
The reproducer from JDK-8240275 didn't reliably reproduce the issue because some of the finalizers were replaced by cleaners in the meantime. |
Co-authored-by: Andrey Turbanov <turbanoff@gmail.com>
test/jdk/sun/net/www/http/KeepAliveStream/KeepAliveStreamFinalizer.java
Outdated
Show resolved
Hide resolved
* @test | ||
* @bug 8240275 | ||
* @library /test/lib | ||
* @run main/othervm KeepAliveStreamFinalizer |
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.
Hello Daniel, it doesn't look like we are doing anything JVM specific in this test. Is the othervm
intentional here?
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 test calls HttpsURLConnection.setDefaultSSLSocketFactor
which requires using /othervm
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.
Ah yes, overlooked that part.
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.
LGTM
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 fine to me.
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 to me.
Thanks for the reviews! /integrate |
Going to push as commit 27bbe7b.
Your commit was automatically rebased without conflicts. |
@djelinski Pushed as commit 27bbe7b. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Please review this patch that removes progress monitoring classes used by UrlConnection.
Since Java 9 these classes are not used in the JDK, and are not exported from java.base. If anyone was still using them, reimplementing them in user code should be pretty straightforward.
This PR also fixes the issue where MeteredStream finalizer could resurrect an unusable connection, causing unexpected exceptions in other parts of the code.
No new regression test; since we are removing the finalizer, I don't believe we will see the issue again. I can add a test for that if you think it still makes sense.
I had to adjust
ProxyModuleMapping.java
test which usedsun.net.ProgressListener
as an example of a module-private interface; I replaced it with another public interface from the same package.Existing tier 1-3 tests continue to pass.
Progress
Issues
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/11474/head:pull/11474
$ git checkout pull/11474
Update a local copy of the PR:
$ git checkout pull/11474
$ git pull https://git.openjdk.org/jdk pull/11474/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 11474
View PR using the GUI difftool:
$ git pr show -t 11474
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/11474.diff