Code Review Request JDK-8161106 Improve SSLSocket test template

Weijun Wang weijun.wang at oracle.com
Mon Jul 25 05:22:59 UTC 2016



On 7/25/2016 13:14, Xuelei Fan wrote:
> On 7/25/2016 12:15 PM, Weijun Wang wrote:
>> Is it possible to use a single new CountDownLatch(2)?
>>
> Per the spec, the countDown() release all waiting threads if the count
> reaches zero, and the await() will not return until the latch has
> counted down to zero, or interrupted or timeout.  It's difficult to use
> one instance of CountDownLatch(2) for two conditions.

Ah, yes. I forgot about that.

>
>> Also, I think comments on lines 145-149 and 199-203 are not really
>> necessary, the println() lines after them are quite clear.
>>
> The comments make the logic easier to understand, I think.  Let's keep
> the comments if it is not a big concern of yours.

Sure.

So everything looks fine to me.

Thanks
Max

>
> Thanks,
> Xuelei
>
>> --Max
>>
>> On 7/25/2016 11:38, Xuelei Fan wrote:
>>> Hi Weijun,
>>>
>>> Please review this update.  Per you suggestion, I updated to use
>>> CountDownLatch for the synchronization between client and server.
>>> CountDownLatch is more simple than ReentrantLock in the context.
>>>
>>>     http://cr.openjdk.java.net/~xuelei/8161106/webrev.03/
>>>
>>> Thanks,
>>> Xuelei
>>>
>



More information about the security-dev mailing list