On Fri, 2 Dec 2022 08:31:25 GMT, Daniel Jeliński <djelin...@openjdk.org> wrote:

> 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 used 
> `sun.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.

This pull request has now been integrated.

Changeset: 27bbe7be
Author:    Daniel Jeliński <djelin...@openjdk.org>
URL:       
https://git.openjdk.org/jdk/commit/27bbe7be2c43a22e8cf55aa403d8018346ae3e37
Stats:     1188 lines in 14 files changed: 294 ins; 875 del; 19 mod

8297976: Remove sun.net.ProgressMonitor and related classes
8240275: Occasional errors in HttpURLConnection due to race with GC

Reviewed-by: jpai, dfuchs, michaelm

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

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

Reply via email to