RFR 8201510 : Merge TwoStacksPlainSocketImpl into DualStackPlainSocketImpl [win]

Ivan Gerasimov ivan.gerasimov at oracle.com
Thu Apr 19 08:44:36 UTC 2018


Thanks you Chris for reviewing this!


On 4/18/18 9:06 AM, Chris Hegarty wrote:
> Ivan,
>
> On 16/04/18 17:29, Ivan Gerasimov wrote:
>> ...
>> WEBREV: http://cr.openjdk.java.net/~igerasim/8201510/00/webrev/
>
> I think this is mostly good. Just one comment.
>
>
> I'm not sure that this is correct.
>
> --- OLD ---
>
>   60         String exclBindProp = AccessController.doPrivileged(
>   61                 new GetPropertyAction("sun.net.useExclusiveBind", 
> ""));
>   62         exclusiveBind = (exclBindProp.isEmpty())
>   63                 ? true
>   64                 : Boolean.parseBoolean(exclBindProp);
>
> --- NEW ---
>  private static final boolean useExclusiveBind =
>   55 Boolean.parseBoolean(AccessController.doPrivileged(
>   56                 new GetPropertyAction("sun.net.useExclusiveBind", 
> "true")));
>
> Exclusive bind should be true iif:
>   1) it is defined and has no value, or
>   2) if is defined and has a value of `true`.
>
Oh.  Good catch!  Thanks!
I restored the logic here in the updated webrev.

> I thought we had tests for this, but maybe not if you are not
> seeing test failures.
>
I found only two tests that set useExclusiveBind.  They seem to ignore 
false positive results, that's why they didn't fail.
I updated them to test with useExclusiveBind set either to 'true' or to 
the empty value.

Here's the updated webrev:

WEBREV: http://cr.openjdk.java.net/~igerasim/8201510/01/webrev/

With kind regards,
Ivan


> -Chris.
>

-- 
With kind regards,
Ivan Gerasimov



More information about the net-dev mailing list