RFR: 8304818: Prune HttpURLConnection cache when corresponding Authenticator is garbage collected [v12]
Daniel Fuchs
dfuchs at openjdk.org
Mon Apr 24 12:20:53 UTC 2023
On Fri, 21 Apr 2023 20:47:54 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.
>
> Michael McMahon has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 19 additional commits since the last revision:
>
> - tests all passing now
> - tidy up
> - Merge branch 'master' into auth
> - update
> - update
> - Merge branch 'master' into auth
> - Update src/java.base/share/classes/sun/net/www/protocol/http/AuthCacheImpl.java
>
> Co-authored-by: Daniel Fuchs <67001856+dfuch at users.noreply.github.com>
> - error in test
> - Jai's review
> - update to remove dependency on AuthCacheImpl in j.n.Authenticator
> - ... and 9 more: https://git.openjdk.org/jdk/compare/dca4c518...94b50c54
That looks good now! Thanks Michael for working on this.
-------------
Marked as reviewed by dfuchs (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/13159#pullrequestreview-1397857379
More information about the net-dev
mailing list