On Wed, 8 May 2024 14:47:28 GMT, Matthew Donovan <mdono...@openjdk.org> wrote:

>> Sean Coffey has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Allow ssl,<option> type syntax as currently done. Improve test case 
>> coverage
>
> src/java.base/share/classes/sun/security/ssl/CertificateMessage.java line 504:
> 
>> 502:                 thisSubjectAltNames = 
>> thisCert.getSubjectAlternativeNames();
>> 503:             } catch (CertificateParsingException cpe) {
>> 504:                 if (SSLLogger.isOn && SSLLogger.isOn("ssl,handshake")) {
> 
> It looks like all of these checks for `SSLLogger.isOn` are unnecessary 
> because the `isOn()` method also checks if logging is enabled. Is this to 
> avoid the method call if the log is disabled?

I think it might be the latter.  `isOn` is stored as `static final` and I guess 
we can assume that it's going to be `false` in majority of cases. Probably an 
optimization.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18764#discussion_r1594209326

Reply via email to