RFR: 8229867: Re-examine synchronization usages in http and https protocol handlers

Michael McMahon michaelm at openjdk.java.net
Fri Oct 9 10:49:20 UTC 2020


On Fri, 9 Oct 2020 09:17:48 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

>> src/java.base/share/classes/sun/net/www/MeteredStream.java line 123:
>> 
>>> 121:         lock();
>>> 122:         try {
>>> 123:             if (closed) return -1;
>> 
>> This double check of `closed` is kind of irritating. Is it really need, or maybe we just drop it and lock
>> unconditionally?
>
> We could. That's a good suggestion.

I agree on that point.

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

PR: https://git.openjdk.java.net/jdk/pull/558



More information about the security-dev mailing list