Integrated: 8305529: DefaultProxySelector.select(URI) in certain cases returns a List with null element

Jaikiran Pai jpai at openjdk.org
Thu Apr 13 01:33:07 UTC 2023


On Tue, 11 Apr 2023 11:24:55 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:

> Can I please get a review of this change which proposes to fix the issue reported in https://bugs.openjdk.org/browse/JDK-8305529?
> 
> There were a couple of places in the `DefaultProxySelector.c` (for unix variant) where we would end up returning an array with `null` element in it, when an error was detected by the underlying library that we invoke upon. The change here fixes those places to immediately return a `null` instance instead of an array, when iterating over the configured proxies. This matches with how we handle similar issues within the code (as well as on other OS, like windows and macos).
> 
> A jtreg test case has been added which reproduces on variant of the reported bug and verifies the fix. As noted in the JBS issue, the other variant of the bug (where environment variables have empty values) isn't reproducible and that appears to be because the underlying library that we use, now has a fix/change to ignore such proxy values.
> 
> One round of testing has completed without any issues. I have triggered a more extensive tier testing to make sure nothing regresses.

This pull request has now been integrated.

Changeset: 3f36dd81
Author:    Jaikiran Pai <jpai at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/3f36dd811e56ecb4b7c6bf1bf8be8a8de9481ed0
Stats:     131 lines in 3 files changed: 129 ins; 0 del; 2 mod

8305529: DefaultProxySelector.select(URI) in certain cases returns a List with null element

Reviewed-by: dfuchs, djelinski, michaelm

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

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


More information about the net-dev mailing list