On 18 Aug 2016, at 10:26, Felix Yang <[email protected]> wrote:
>
> Hi all,
>
> please review a new test, which tries to verify "Proxy-Authenticate"
> header can be handled correctly.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8163561
>
> Webrev: http://cr.openjdk.java.net/~xiaofeya/8163561/webrev.00/
Thank you Felix, this mainly looks good. Just some small comments:
1) You do not need the serverReady latch. Once MyProxy is created it is ok
for the client to initiate a connection before the thread has started
running.
The ServerSocket is already created and listening.
2) authLatch could be replaced with a volatile boolean, since the authenticator
is guaranteed ( if there is no bug ) to be called before the
CompletableFuture
of HttpResponse.
3) In MyProxy please line up the AutoCloseables underneath each other.
4) Authenticator.setDefault(auth); is not needed, right?
-Chris.