Integrated: 8304818: Prune HttpURLConnection cache when corresponding Authenticator is garbage collected

Michael McMahon michaelm at openjdk.org
Mon Apr 24 17:29:10 UTC 2023


On Thu, 23 Mar 2023 15:47:10 GMT, Michael McMahon <michaelm at openjdk.org> wrote:

> Hi,
> 
> Can I get a review for this please? This change uses a Cleaner to check when java.net.Authenticator instances become unreachable, and then prunes the authentication cache for entries that correspond to that Authenticator and therefore cannot be used again. This stops the authentication cache from growing in size unbounded. Note, this only happens in the probably unusual case where more than one Authenticator object is used. Normally there is no reason to use more than one instance.
> 
> Thanks,
> Michael.

This pull request has now been integrated.

Changeset: 314db55f
Author:    Michael McMahon <michaelm at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/314db55f6dde033f62481b62f10dd11030473569
Stats:     891 lines in 18 files changed: 211 ins; 551 del; 129 mod

8304818: Prune HttpURLConnection cache when corresponding Authenticator is garbage collected

Reviewed-by: dfuchs, djelinski

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

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


More information about the net-dev mailing list